Skip to content
Snippets Groups Projects
Commit 17d285f3 authored by Podosochnyy Maxim's avatar Podosochnyy Maxim
Browse files

Правки

parent fad89499
No related branches found
No related tags found
No related merge requests found
......@@ -118,10 +118,11 @@ class ExtensionSetup:
was_found = False
for local_rule in cloned_role.rules:
# Если запись с правами доступа на коллекцию найдена - правила нужно совместить
if local_rule.collection_id == exist_rule.collection_id:
was_found = True
local_rule.actions[:] = list(set(local_rule.actions + exist_rule.actions))
local_rule.actions[:] = list(set(list(local_rule.actions) + list(exist_rule.actions)))
break
......@@ -129,7 +130,7 @@ class ExtensionSetup:
if not was_found:
cloned_role.rules.append(common_pb2.Rule(
collection_id=exist_rule.collection_id,
actions=exist_rule.actions
actions=list(exist_rule.actions)
))
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment