Show More
@@ -66,6 +66,10 b' class UsersGroupsController(BaseControll' | |||
|
66 | 66 | c.available_permissions = config['available_permissions'] |
|
67 | 67 | |
|
68 | 68 | def __load_data(self, user_group_id): |
|
69 | permissions = { | |
|
70 | 'repositories': {}, | |
|
71 | 'repositories_groups': {} | |
|
72 | } | |
|
69 | 73 | ugroup_repo_perms = UserGroupRepoToPerm.query()\ |
|
70 | 74 | .options(joinedload(UserGroupRepoToPerm.permission))\ |
|
71 | 75 | .options(joinedload(UserGroupRepoToPerm.repository))\ |
@@ -73,7 +77,7 b' class UsersGroupsController(BaseControll' | |||
|
73 | 77 | .all() |
|
74 | 78 | |
|
75 | 79 | for gr in ugroup_repo_perms: |
|
76 |
|
|
|
80 | permissions['repositories'][gr.repository.repo_name] \ | |
|
77 | 81 | = gr.permission.permission_name |
|
78 | 82 | |
|
79 | 83 | ugroup_group_perms = UserGroupRepoGroupToPerm.query()\ |
@@ -83,9 +87,9 b' class UsersGroupsController(BaseControll' | |||
|
83 | 87 | .all() |
|
84 | 88 | |
|
85 | 89 | for gr in ugroup_group_perms: |
|
86 |
|
|
|
90 | permissions['repositories_groups'][gr.group.group_name] \ | |
|
87 | 91 | = gr.permission.permission_name |
|
88 | ||
|
92 | c.permissions = permissions | |
|
89 | 93 | c.group_members_obj = sorted((x.user for x in c.users_group.members), |
|
90 | 94 | key=lambda u: u.username.lower()) |
|
91 | 95 |
@@ -118,9 +118,13 b'' | |||
|
118 | 118 | </div> |
|
119 | 119 | <%namespace name="dpb" file="/base/default_perms_box.html"/> |
|
120 | 120 | ${dpb.default_perms_box(url('users_group_perm', id=c.users_group.users_group_id))} |
|
121 | ||
|
122 | ## permissions overview | |
|
123 | <%namespace name="p" file="/base/perms_summary.html"/> | |
|
124 | ${p.perms_summary(c.permissions)} | |
|
121 | 125 | </div> |
|
122 | 126 | |
|
123 | <div class="box box-right"> | |
|
127 | <div class="box box-right" style="clear:right"> | |
|
124 | 128 | <div class="title"> |
|
125 | 129 | <h5>${_('Permissions')}</h5> |
|
126 | 130 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now