fix: permission groups - refactored a bit
This commit is contained in:
parent
ed71e815ff
commit
44f1ac281c
1 changed files with 3 additions and 2 deletions
|
|
@ -849,8 +849,9 @@ class PermissionCalculator(object):
|
|||
|
||||
multiple_counter[r_k] += 1
|
||||
if multiple_counter[r_k] > 1:
|
||||
cur_perm = self.permissions_repository_branches.perm_origin_stack[r_k][pattern]
|
||||
cur_perm = cur_perm[0][0] if cur_perm else "branch.none"
|
||||
# Get the previous permission for this pattern, with fallback, from perm_origin_stack that keeps history
|
||||
pattern_perms = self.permissions_repository_branches.perm_origin_stack.get(r_k, {}).get(pattern, [])
|
||||
cur_perm = pattern_perms[0][0] if pattern_perms else "branch.none"
|
||||
p = self._choose_permission(p, cur_perm)
|
||||
|
||||
self.permissions_repository_branches[r_k] = {pattern: p}, o
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue