Domain Policy Update to be non-system (#19060)

(cherry picked from commit 3578a4b32d605494d44073bfe3fb82742a62b93e)
This commit is contained in:
Mohit Yadav 2024-12-15 01:18:12 +05:30 committed by mohitdeuex
parent d2d7212bc6
commit 7175afb0cd
6 changed files with 14 additions and 4 deletions

View File

@ -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';

View File

@ -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';

View File

@ -4,8 +4,8 @@
"fullyQualifiedName": "DomainOnlyAccessPolicy", "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.", "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, "enabled": true,
"allowDelete": false, "allowDelete": true,
"provider": "system", "provider": "user",
"rules": [ "rules": [
{ {
"name": "DomainOnlyAccessRule", "name": "DomainOnlyAccessRule",

View File

@ -2,8 +2,8 @@
"name": "DomainOnlyAccessRole", "name": "DomainOnlyAccessRole",
"displayName": "Domain Only Access Role", "displayName": "Domain Only Access Role",
"description": "Role Corresponding to Domain Access Restriction.", "description": "Role Corresponding to Domain Access Restriction.",
"allowDelete": false, "allowDelete": true,
"provider": "system", "provider": "user",
"policies" : [ "policies" : [
{ {
"type" : "policy", "type" : "policy",