Mercurial > kallithea
annotate rhodecode/templates/admin/repos_groups/repos_group_edit_perms.html @ 3332:92dfc033ee6f beta
forbid removing yourself as beeing an admin of a group
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 05 Feb 2013 01:57:37 +0100 |
parents | dd0ee9119aa9 |
children | 5f1850e4712a |
rev | line source |
---|---|
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 <table id="permissions_manage" class="noborder"> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 <tr> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <td>${_('none')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 <td>${_('read')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 <td>${_('write')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 <td>${_('admin')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 <td>${_('member')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 <td></td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 </tr> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 ## USERS |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 %for r2p in c.repos_group.repo_group_to_perm: |
3332
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
12 ##forbid revoking permission from yourself |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
13 <tr id="id${id(r2p.user.username)}"> |
3332
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
14 %if c.rhodecode_user.user_id != r2p.user.user_id or c.rhodecode_user.is_admin: |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.none')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
16 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.read')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.write')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.admin')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 <td style="white-space: nowrap;"> |
2418
e5c8472ac0ac
The ‘default’ username on the permission panels is now translatable.
Vincent Duvert <vincent@duvert.net>
parents:
2369
diff
changeset
|
20 <img class="perm-gravatar" src="${h.gravatar_url(r2p.user.email,14)}"/>${r2p.user.username if r2p.user.username != 'default' else _('default')} |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 </td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 <td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 %if r2p.user.username !='default': |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
24 <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')"> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
25 ${_('revoke')} |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 </span> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 %endif |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
28 </td> |
3332
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
29 %else: |
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
30 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.none', disabled="disabled")}</td> |
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
31 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.read', disabled="disabled")}</td> |
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
32 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.write', disabled="disabled")}</td> |
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
33 <td>${h.radio('u_perm_%s' % r2p.user.username,'group.admin', disabled="disabled")}</td> |
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
34 <td style="white-space: nowrap;"> |
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
35 <img class="perm-gravatar" src="${h.gravatar_url(r2p.user.email,14)}"/>${r2p.user.username if r2p.user.username != 'default' else _('default')} |
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
36 </td> |
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
37 <td> |
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
38 </td> |
92dfc033ee6f
forbid removing yourself as beeing an admin of a group
Marcin Kuzminski <marcin@python-works.com>
parents:
3221
diff
changeset
|
39 %endif |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
40 </tr> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
41 %endfor |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
42 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
43 ## USERS GROUPS |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
44 %for g2p in c.repos_group.users_group_to_perm: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
45 <tr id="id${id(g2p.users_group.users_group_name)}"> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
46 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.none')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
47 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.read')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
48 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.write')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
49 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.admin')}</td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
50 <td style="white-space: nowrap;"> |
2142
a21eab6ff42f
Added gravatars into permissions view and permissions autocomplete
Marcin Kuzminski <marcin@python-works.com>
parents:
2126
diff
changeset
|
51 <img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/>${g2p.users_group.users_group_name} |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
52 </td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
53 <td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
54 <span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')"> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
55 ${_('revoke')} |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
56 </span> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
57 </td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
58 </tr> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
59 %endfor |
2759
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
60 <% |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
61 _tmpl = h.literal("""' \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
62 <td><input type="radio" value="group.none" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
63 <td><input type="radio" value="group.read" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
64 <td><input type="radio" value="group.write" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
65 <td><input type="radio" value="group.admin" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
66 <td class="ac"> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
67 <div class="perm_ac" id="perm_ac_{0}"> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
68 <input class="yui-ac-input" id="perm_new_member_name_{0}" name="perm_new_member_name_{0}" value="" type="text"> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
69 <input id="perm_new_member_type_{0}" name="perm_new_member_type_{0}" value="" type="hidden"> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
70 <div id="perm_container_{0}"></div> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
71 </div> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
72 </td> \ |
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
73 <td></td>'""") |
2815
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2759
diff
changeset
|
74 %> |
acc05c33cc0c
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2759
diff
changeset
|
75 ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl' |
2759
c61c2ccea2b4
#538 form for permissions can handle multiple users at once
Marcin Kuzminski <marcin@python-works.com>
parents:
2418
diff
changeset
|
76 <tr class="new_members last_new_member" id="add_perm_input"></tr> |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
77 <tr> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
78 <td colspan="6"> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
79 <span id="add_perm" class="add_icon" style="cursor: pointer;"> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
80 ${_('Add another member')} |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
81 </span> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
82 </td> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
83 </tr> |
2820
c0cc8f8a71b0
Permissions on group can be set in recursive mode setting defined permission to all children
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
84 <tr> |
c0cc8f8a71b0
Permissions on group can be set in recursive mode setting defined permission to all children
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
85 <td colspan="6"> |
2832 | 86 ${h.checkbox('recursive',value="True", label=_('apply to children'))} |
3221
dd0ee9119aa9
recursive mode of setting permission should skip private repositories, they should remain private, it's proper thing to do !
Marcin Kuzminski <marcin@python-works.com>
parents:
3197
diff
changeset
|
87 <span class="help-block">${_('Set or revoke permission to all children of that group, including non-private repositories and other groups')}</span> |
2820
c0cc8f8a71b0
Permissions on group can be set in recursive mode setting defined permission to all children
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
88 </td> |
c0cc8f8a71b0
Permissions on group can be set in recursive mode setting defined permission to all children
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
89 </tr> |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
90 </table> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
91 <script type="text/javascript"> |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
92 function ajaxActionUser(user_id, field_id) { |
2126
de72388c713d
fixed #396 fixed problems with revoking users in nested groups
Marcin Kuzminski <marcin@python-works.com>
parents:
1982
diff
changeset
|
93 var sUrl = "${h.url('delete_repos_group_user_perm',group_name=c.repos_group.group_name)}"; |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
94 var callback = { |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
95 success: function (o) { |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
96 var tr = YUD.get(String(field_id)); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
97 tr.parentNode.removeChild(tr); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
98 }, |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
99 failure: function (o) { |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
100 alert("${_('Failed to remove user')}"); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
101 }, |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
102 }; |
2820
c0cc8f8a71b0
Permissions on group can be set in recursive mode setting defined permission to all children
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
103 var recursive = YUD.get('recursive').checked; |
c0cc8f8a71b0
Permissions on group can be set in recursive mode setting defined permission to all children
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
104 var postData = '_method=delete&recursive={0}&user_id={1}'.format(recursive,user_id); |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
105 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
106 }; |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
107 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
108 function ajaxActionUsersGroup(users_group_id,field_id){ |
2126
de72388c713d
fixed #396 fixed problems with revoking users in nested groups
Marcin Kuzminski <marcin@python-works.com>
parents:
1982
diff
changeset
|
109 var sUrl = "${h.url('delete_repos_group_users_group_perm',group_name=c.repos_group.group_name)}"; |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
110 var callback = { |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
111 success:function(o){ |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
112 var tr = YUD.get(String(field_id)); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
113 tr.parentNode.removeChild(tr); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
114 }, |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
115 failure:function(o){ |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
116 alert("${_('Failed to remove users group')}"); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
117 }, |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
118 }; |
2820
c0cc8f8a71b0
Permissions on group can be set in recursive mode setting defined permission to all children
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
119 var recursive = YUD.get('recursive').checked; |
c0cc8f8a71b0
Permissions on group can be set in recursive mode setting defined permission to all children
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
120 var postData = '_method=delete&recursive={0}&users_group_id={1}'.format(recursive,users_group_id); |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
121 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
122 }; |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
123 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
124 YUE.onDOMReady(function () { |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
125 if (!YUD.hasClass('perm_new_member_name', 'error')) { |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
126 YUD.setStyle('add_perm_input', 'display', 'none'); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
127 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
128 YAHOO.util.Event.addListener('add_perm', 'click', function () { |
3197 | 129 addPermAction(${_tmpl}, ${c.users_array|n}, ${c.users_groups_array|n}); |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
130 }); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
131 }); |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
132 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
133 </script> |