Update ACL app to compy with MERC 5 and 6
Update the entire with keyword arguments. Update the views to comply with MERC 6 by returning error 404 on access failure. API are untouched. Add icon to the ACL delete button. Add additional view tests. Use the new filtered choice form to display a select2 enabled role selection widget. Update the ACL creation view to not redirect to an existing ACL in case of duplication but to instead stop and display an error with a suggestion to the user to instead edit the existing ACL. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -19,14 +19,15 @@ class ACLsApp(MayanAppConfig):
|
||||
def ready(self):
|
||||
super(ACLsApp, self).ready()
|
||||
|
||||
AccessControlList = self.get_model('AccessControlList')
|
||||
AccessControlList = self.get_model(model_name='AccessControlList')
|
||||
|
||||
SourceColumn(
|
||||
source=AccessControlList, label=_('Role'), attribute='role'
|
||||
attribute='role', is_identifier=True, is_sortable=True,
|
||||
source=AccessControlList
|
||||
)
|
||||
SourceColumn(
|
||||
source=AccessControlList, label=_('Permissions'),
|
||||
attribute='get_permission_titles'
|
||||
attribute='get_permission_titles', include_label=True,
|
||||
source=AccessControlList
|
||||
)
|
||||
|
||||
menu_object.bind_links(
|
||||
|
||||
Reference in New Issue
Block a user