Skip to content

Commit

Permalink
Domain Policy Update to be non-system (#19060)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3578a4b)
  • Loading branch information
mohityadav766 committed Dec 16, 2024
1 parent d2d7212 commit 7175afb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- Make domain policy and role non-system
UPDATE policy_entity SET json = JSON_SET(json, '$.provider', 'user') where name = 'DomainOnlyAccessPolicy';
UPDATE policy_entity SET json = JSON_SET(json, '$.allowDelete', true) where name = 'DomainOnlyAccessPolicy';
UPDATE role_entity SET json = JSON_SET(json, '$.provider', 'user') where name = 'DomainOnlyAccessRole';
UPDATE role_entity SET json = JSON_SET(json, '$.allowDelete', true) where name = 'DomainOnlyAccessRole';
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- Make domain policy and role non-system
UPDATE policy_entity SET json = JSONB_SET(json::jsonb, '{provider}', '"user"', true) where name = 'DomainOnlyAccessPolicy';
UPDATE policy_entity SET json = JSONB_SET(json::jsonb, '{allowDelete}', 'true', true) WHERE name = 'DomainOnlyAccessPolicy';
UPDATE role_entity SET json = JSONB_SET(json::jsonb, '{provider}', '"user"', true) where name = 'DomainOnlyAccessRole';
UPDATE role_entity SET json = JSONB_SET(json::jsonb, '{allowDelete}', 'true', true) WHERE name = 'DomainOnlyAccessRole';
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"fullyQualifiedName": "DomainOnlyAccessPolicy",
"description": "This Policy adds restrictions so that users will have access to domain related data. If the user has some domain, then he will be able to access data only for that domain. If the user does not have any domain assigned , he will be able to access only assets which also does not have any domain.",
"enabled": true,
"allowDelete": false,
"provider": "system",
"allowDelete": true,
"provider": "user",
"rules": [
{
"name": "DomainOnlyAccessRule",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "DomainOnlyAccessRole",
"displayName": "Domain Only Access Role",
"description": "Role Corresponding to Domain Access Restriction.",
"allowDelete": false,
"provider": "system",
"allowDelete": true,
"provider": "user",
"policies" : [
{
"type" : "policy",
Expand Down

0 comments on commit 7175afb

Please sign in to comment.