diff --git a/HISTORY.rst b/HISTORY.rst index 848f47f2c6..4e3672ede2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -63,6 +63,7 @@ the view's objects. - Apply link permission cascade checks to the message of the day, indexing and parsing, setup link. +- Add ACL support to the message of the day app. 3.0.1 (2018-07-08) ================= diff --git a/mayan/apps/motd/apps.py b/mayan/apps/motd/apps.py index 4bb32193da..3cd3dc01bb 100644 --- a/mayan/apps/motd/apps.py +++ b/mayan/apps/motd/apps.py @@ -5,6 +5,8 @@ import logging from django.utils.translation import ugettext_lazy as _ from acls import ModelPermission +from acls.links import link_acl_list +from acls.permissions import permission_acl_edit, permission_acl_view from common import MayanAppConfig, menu_object, menu_secondary, menu_setup from navigation import SourceColumn @@ -32,6 +34,7 @@ class MOTDApp(MayanAppConfig): Message = self.get_model('Message') ModelPermission.register( model=Message, permissions=( + permission_acl_edit, permission_acl_view, permission_message_delete, permission_message_edit, permission_message_view ) @@ -50,7 +53,7 @@ class MOTDApp(MayanAppConfig): menu_object.bind_links( links=( - link_message_edit, link_message_delete + link_message_edit, link_acl_list, link_message_delete ), sources=(Message,) ) menu_secondary.bind_links(