diff --git a/apps/perms/api/mixin.py b/apps/perms/api/mixin.py index 24bd9abd2..9c726691f 100644 --- a/apps/perms/api/mixin.py +++ b/apps/perms/api/mixin.py @@ -174,6 +174,8 @@ class GrantAssetsMixin(LabelFilterMixin): system_user = system_users_map.get(sid) if not system_user: continue + if not asset.has_protocol(system_user.protocol): + continue system_user.actions = action system_users_granted.append(system_user) asset.system_users_granted = system_users_granted diff --git a/apps/perms/api/user_permission.py b/apps/perms/api/user_permission.py index 0746252cb..13ee07951 100644 --- a/apps/perms/api/user_permission.py +++ b/apps/perms/api/user_permission.py @@ -256,6 +256,8 @@ class UserGrantedNodesWithAssetsApi(UserPermissionCacheMixin, NodesWithUngroupMi system_user = _system_users_map.get(system_user_id) if not system_user: continue + if not asset.has_protocol(system_user.protocol): + continue system_user.actions = action system_user_granted.append(system_user) asset.system_users_granted = system_user_granted