Add 'messages.list' permission, to protect inbox etc.

At least will be useful for a soft launch, beyond that not sure.
This commit is contained in:
Lance Edgar 2016-02-01 15:44:10 -06:00
parent 60d3778160
commit 4bade10317

View file

@ -267,13 +267,17 @@ class SentView(MessagesView):
def includeme(config):
config.add_tailbone_permission('messages', 'messages.list', "List/Search Messages")
# inbox
config.add_route('messages.inbox', '/messages/inbox/')
config.add_view(InboxView, attr='index', route_name='messages.inbox')
config.add_view(InboxView, attr='index', route_name='messages.inbox',
permission='messages.list')
# archive
config.add_route('messages.archive', '/messages/archive/')
config.add_view(ArchiveView, attr='index', route_name='messages.archive')
config.add_view(ArchiveView, attr='index', route_name='messages.archive',
permission='messages.list')
# move bulk
config.add_route('messages.move_bulk', '/messages/move-bulk')
@ -281,7 +285,8 @@ def includeme(config):
# sent
config.add_route('messages.sent', '/messages/sent/')
config.add_view(SentView, attr='index', route_name='messages.sent')
config.add_view(SentView, attr='index', route_name='messages.sent',
permission='messages.list')
# view
config.add_route('messages.view', '/messages/{uuid}')