Show More
@@ -54,7 +54,7 b' class RepoSettingsPermissionsView(RepoAp' | |||||
54 | c = self.load_default_context() |
|
54 | c = self.load_default_context() | |
55 | c.active = 'permissions' |
|
55 | c.active = 'permissions' | |
56 | if self.request.GET.get('branch_permissions'): |
|
56 | if self.request.GET.get('branch_permissions'): | |
57 |
h.flash(_('Explicitly add user or user group with write |
|
57 | h.flash(_('Explicitly add user or user group with write or higher ' | |
58 | 'permission to modify their branch permissions.'), |
|
58 | 'permission to modify their branch permissions.'), | |
59 | category='notice') |
|
59 | category='notice') | |
60 | return self._get_template_context(c) |
|
60 | return self._get_template_context(c) |
@@ -83,7 +83,7 b' class VcsServer(object):' | |||||
83 | else: |
|
83 | else: | |
84 | if permission in self.write_perms: |
|
84 | if permission in self.write_perms: | |
85 | log.info( |
|
85 | log.info( | |
86 |
'WRITE |
|
86 | 'WRITE, or Higher Permissions for User "%s" detected to repo "%s"!', | |
87 | self.user, self.repo_name) |
|
87 | self.user, self.repo_name) | |
88 | return 0 |
|
88 | return 0 | |
89 |
|
89 |
@@ -561,7 +561,7 b' class PermissionModel(BaseModel):' | |||||
561 | default_user_id = User.get_default_user_id() |
|
561 | default_user_id = User.get_default_user_id() | |
562 | user_write_permissions = collections.OrderedDict() |
|
562 | user_write_permissions = collections.OrderedDict() | |
563 |
|
563 | |||
564 |
# write |
|
564 | # write or higher and DEFAULT user for inheritance | |
565 | for perm in db_repo.permissions(): |
|
565 | for perm in db_repo.permissions(): | |
566 | if perm.permission in write_plus or perm.user_id == default_user_id: |
|
566 | if perm.permission in write_plus or perm.user_id == default_user_id: | |
567 | user_write_permissions[perm.user_id] = perm |
|
567 | user_write_permissions[perm.user_id] = perm | |
@@ -571,7 +571,7 b' class PermissionModel(BaseModel):' | |||||
571 | write_plus = ['repository.write', 'repository.admin'] |
|
571 | write_plus = ['repository.write', 'repository.admin'] | |
572 | user_group_write_permissions = collections.OrderedDict() |
|
572 | user_group_write_permissions = collections.OrderedDict() | |
573 |
|
573 | |||
574 |
# write |
|
574 | # write or higher and DEFAULT user for inheritance | |
575 | for p in db_repo.permission_user_groups(): |
|
575 | for p in db_repo.permission_user_groups(): | |
576 | if p.permission in write_plus: |
|
576 | if p.permission in write_plus: | |
577 | user_group_write_permissions[p.users_group_id] = p |
|
577 | user_group_write_permissions[p.users_group_id] = p |
@@ -106,9 +106,9 b'' | |||||
106 |
|
106 | |||
107 | %if getattr(_user, 'branch_rules', None): |
|
107 | %if getattr(_user, 'branch_rules', None): | |
108 | % if used_by_n_rules == 1: |
|
108 | % if used_by_n_rules == 1: | |
109 |
(${_('used by {} branch rule, requires write |
|
109 | (${_('used by {} branch rule, requires write or higher permissions').format(used_by_n_rules)}) | |
110 | % else: |
|
110 | % else: | |
111 |
(${_('used by {} branch rules, requires write |
|
111 | (${_('used by {} branch rules, requires write or higher permissions').format(used_by_n_rules)}) | |
112 | % endif |
|
112 | % endif | |
113 | %endif |
|
113 | %endif | |
114 | % endif |
|
114 | % endif |
General Comments 0
You need to be logged in to leave comments.
Login now