Mercurial > kallithea
comparison rhodecode/config/routing.py @ 3714:7e3d89d9d3a2 beta
- Manage User’s Groups: create, delete, rename, add/remove users inside.
by user group admin.
In this case, a user's group can be owned by several people thru an owner user's group.
Some refactoring of naming, permission handling logic.
- remove some code duplicity as well as inconsistent naming
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 08 Apr 2013 22:47:35 +0200 |
parents | 45df84d36b44 |
children | 25dbbdae3ed9 |
comparison
equal
deleted
inserted
replaced
3713:e45f8cefd7d9 | 3714:7e3d89d9d3a2 |
---|---|
198 action="show", conditions=dict(method=["GET"], | 198 action="show", conditions=dict(method=["GET"], |
199 function=check_group)) | 199 function=check_group)) |
200 m.connect("formatted_repos_group", "/repos_groups/{group_name:.*?}.{format}", | 200 m.connect("formatted_repos_group", "/repos_groups/{group_name:.*?}.{format}", |
201 action="show", conditions=dict(method=["GET"], | 201 action="show", conditions=dict(method=["GET"], |
202 function=check_group)) | 202 function=check_group)) |
203 | |
204 #add repo perm member | |
205 m.connect('set_repo_group_perm_member', | |
206 "/set_repo_group_perm_member/{group_name:.*?}", | |
207 action="set_repo_group_perm_member", | |
208 conditions=dict(method=["POST"], function=check_group)) | |
209 | |
203 # ajax delete repository group perm user | 210 # ajax delete repository group perm user |
204 m.connect('delete_repos_group_user_perm', | 211 m.connect('delete_repos_group_user_perm', |
205 "/delete_repos_group_user_perm/{group_name:.*?}", | 212 "/delete_repos_group_user_perm/{group_name:.*?}", |
206 action="delete_repos_group_user_perm", | 213 action="delete_repos_group_user_perm", |
207 conditions=dict(method=["DELETE"], function=check_group)) | 214 conditions=dict(method=["DELETE"], function=check_group)) |
277 action="show", conditions=dict(method=["GET"])) | 284 action="show", conditions=dict(method=["GET"])) |
278 m.connect("formatted_users_group", "/users_groups/{id}.{format}", | 285 m.connect("formatted_users_group", "/users_groups/{id}.{format}", |
279 action="show", conditions=dict(method=["GET"])) | 286 action="show", conditions=dict(method=["GET"])) |
280 | 287 |
281 #EXTRAS USER ROUTES | 288 #EXTRAS USER ROUTES |
282 m.connect("users_group_perm", "/users_groups_perm/{id}", | 289 # update |
290 m.connect("users_group_perm", "/users_groups/{id}/update_global_perm", | |
283 action="update_perm", conditions=dict(method=["PUT"])) | 291 action="update_perm", conditions=dict(method=["PUT"])) |
292 | |
293 #add user group perm member | |
294 m.connect('set_user_group_perm_member', "/users_groups/{id}/grant_perm", | |
295 action="set_user_group_perm_member", | |
296 conditions=dict(method=["POST"])) | |
297 | |
298 #ajax delete user group perm | |
299 m.connect('delete_user_group_perm_member', "/users_groups/{id}/revoke_perm", | |
300 action="delete_user_group_perm_member", | |
301 conditions=dict(method=["DELETE"])) | |
284 | 302 |
285 #ADMIN GROUP REST ROUTES | 303 #ADMIN GROUP REST ROUTES |
286 rmap.resource('group', 'groups', | 304 rmap.resource('group', 'groups', |
287 controller='admin/groups', path_prefix=ADMIN_PREFIX) | 305 controller='admin/groups', path_prefix=ADMIN_PREFIX) |
288 | 306 |