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