Expose the "sync users" flag for Roles

This commit is contained in:
Lance Edgar 2021-11-13 15:05:45 -06:00
parent 901dacf038
commit a7b91b5b31

View file

@ -53,10 +53,15 @@ class RoleView(PrincipalMasterView):
has_versions = True has_versions = True
touchable = True touchable = True
labels = {
'sync_me': "Sync Attrs & Perms",
}
grid_columns = [ grid_columns = [
'name', 'name',
'session_timeout', 'session_timeout',
'sync_me', 'sync_me',
'sync_users',
'node_type', 'node_type',
'notes', 'notes',
] ]
@ -66,6 +71,7 @@ class RoleView(PrincipalMasterView):
'session_timeout', 'session_timeout',
'notes', 'notes',
'sync_me', 'sync_me',
'sync_users',
'node_type', 'node_type',
'users', 'users',
'permissions', 'permissions',
@ -178,10 +184,11 @@ class RoleView(PrincipalMasterView):
elif role is guest_role(self.Session()): elif role is guest_role(self.Session()):
include = False include = False
if not include: if not include:
f.remove('sync_me', 'node_type') f.remove('sync_me', 'sync_users', 'node_type')
else: else:
if not self.has_perm('edit_node_sync'): if not self.has_perm('edit_node_sync'):
f.set_readonly('sync_me') f.set_readonly('sync_me')
f.set_readonly('sync_users')
f.set_readonly('node_type') f.set_readonly('node_type')
# notes # notes