Show More
@@ -462,8 +462,7 b' class RepoModel(BaseModel):' | |||
|
462 | 462 | UserGroupRepoToPerm.create( |
|
463 | 463 | perm.users_group, new_repo, perm.permission) |
|
464 | 464 | # in case we copy permissions and also set this repo to private |
|
465 | # override the default user permission to make it a private | |
|
466 | # repo | |
|
465 | # override the default user permission to make it a private repo | |
|
467 | 466 | if private: |
|
468 | 467 | RepoModel(self.sa).grant_user_permission( |
|
469 | 468 | repo=new_repo, user=User.DEFAULT_USER, perm=EMPTY_PERM) |
@@ -485,8 +484,7 b' class RepoModel(BaseModel):' | |||
|
485 | 484 | perm_name = perm.permission.permission_name.replace( |
|
486 | 485 | 'group.', 'repository.') |
|
487 | 486 | perm_obj = Permission.get_by_key(perm_name) |
|
488 | UserGroupRepoToPerm.create( | |
|
489 | perm.users_group, new_repo, perm_obj) | |
|
487 | UserGroupRepoToPerm.create(perm.users_group, new_repo, perm_obj) | |
|
490 | 488 | |
|
491 | 489 | if private: |
|
492 | 490 | RepoModel(self.sa).grant_user_permission( |
@@ -497,8 +495,7 b' class RepoModel(BaseModel):' | |||
|
497 | 495 | self.sa.add(perm_obj) |
|
498 | 496 | |
|
499 | 497 | # now automatically start following this repository as owner |
|
500 | ScmModel(self.sa).toggle_following_repo(new_repo.repo_id, | |
|
501 | owner.user_id) | |
|
498 | ScmModel(self.sa).toggle_following_repo(new_repo.repo_id, owner.user_id) | |
|
502 | 499 | |
|
503 | 500 | # we need to flush here, in order to check if database won't |
|
504 | 501 | # throw any exceptions, create filesystem dirs at the very end |
@@ -70,7 +70,7 b'' | |||
|
70 | 70 | </div> |
|
71 | 71 | <div class="checkboxes"> |
|
72 | 72 | ${h.checkbox('group_copy_permissions', value="True", checked="checked")} |
|
73 |
<span class="help-block">${_('Copy permission |
|
|
73 | <span class="help-block">${_('Copy permissions from parent repository group.')}</span> | |
|
74 | 74 | </div> |
|
75 | 75 | </div> |
|
76 | 76 |
@@ -133,7 +133,7 b'' | |||
|
133 | 133 | %endfor |
|
134 | 134 | |
|
135 | 135 | ## USER GROUPS |
|
136 | %for _user_group in c.repo_group.permission_user_groups(): | |
|
136 | %for _user_group in c.repo_group.permission_user_groups(with_members=True): | |
|
137 | 137 | <tr id="id${id(_user_group.users_group_name)}"> |
|
138 | 138 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.none', checked=_user_group.permission=='group.none')}</td> |
|
139 | 139 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.read', checked=_user_group.permission=='group.read')}</td> |
@@ -148,6 +148,7 b'' | |||
|
148 | 148 | %else: |
|
149 | 149 | ${h.link_to_group(_user_group.users_group_name)} |
|
150 | 150 | %endif |
|
151 | (${_('members')}: ${len(_user_group.members)}) | |
|
151 | 152 | </td> |
|
152 | 153 | <td class="td-action"> |
|
153 | 154 | <span class="btn btn-link btn-danger revoke_perm" |
@@ -90,7 +90,7 b'' | |||
|
90 | 90 | </div> |
|
91 | 91 | <div class="checkboxes"> |
|
92 | 92 | ${h.checkbox('repo_copy_permissions', value="True", checked="checked")} |
|
93 |
<span class="help-block">${_('Copy permission |
|
|
93 | <span class="help-block">${_('Copy permissions from parent repository group.')}</span> | |
|
94 | 94 | </div> |
|
95 | 95 | </div> |
|
96 | 96 | <div class="field"> |
@@ -128,7 +128,7 b'' | |||
|
128 | 128 | %endfor |
|
129 | 129 | |
|
130 | 130 | ## USER GROUPS |
|
131 | %for _user_group in c.rhodecode_db_repo.permission_user_groups(): | |
|
131 | %for _user_group in c.rhodecode_db_repo.permission_user_groups(with_members=True): | |
|
132 | 132 | <tr> |
|
133 | 133 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.none', checked=_user_group.permission=='repository.none')}</td> |
|
134 | 134 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.read', checked=_user_group.permission=='repository.read')}</td> |
@@ -143,6 +143,7 b'' | |||
|
143 | 143 | %else: |
|
144 | 144 | ${h.link_to_group(_user_group.users_group_name)} |
|
145 | 145 | %endif |
|
146 | (${_('members')}: ${len(_user_group.members)}) | |
|
146 | 147 | </td> |
|
147 | 148 | <td class="td-action"> |
|
148 | 149 | <span class="btn btn-link btn-danger revoke_perm" |
@@ -135,7 +135,7 b'' | |||
|
135 | 135 | %endfor |
|
136 | 136 | |
|
137 | 137 | ## USER GROUPS |
|
138 | %for _user_group in c.user_group.permission_user_groups(): | |
|
138 | %for _user_group in c.user_group.permission_user_groups(with_members=True): | |
|
139 | 139 | <tr> |
|
140 | 140 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.none')}</td> |
|
141 | 141 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.read')}</td> |
@@ -150,6 +150,7 b'' | |||
|
150 | 150 | %else: |
|
151 | 151 | ${h.link_to_group(_user_group.users_group_name)} |
|
152 | 152 | %endif |
|
153 | (${_('members')}: ${len(_user_group.members)}) | |
|
153 | 154 | </td> |
|
154 | 155 | <td class="td-action"> |
|
155 | 156 | <span class="btn btn-link btn-danger revoke_perm" |
@@ -86,7 +86,7 b'' | |||
|
86 | 86 | </div> |
|
87 | 87 | <div class="checkboxes"> |
|
88 | 88 | ${h.checkbox('copy_permissions',value="True", checked="checked")} |
|
89 |
<span class="help-block">${_('Copy permissions from |
|
|
89 | <span class="help-block">${_('Copy permissions from parent repository.')}</span> | |
|
90 | 90 | </div> |
|
91 | 91 | </div> |
|
92 | 92 |
General Comments 0
You need to be logged in to leave comments.
Login now