Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
729 B
MySQL
Raw Normal View History

-- Update DomainOnlyAccessPolicy with new rules structure
UPDATE policy_entity
SET json = jsonb_set(
json,
'{rules}',
'[
{
"name": "DomainAccessDenyRule",
"description": "Deny access when domain check fails",
"effect": "deny",
"resources": ["All"],
"operations": ["All"],
"condition": "!hasDomain()"
},
{
"name": "DomainAccessAllowRule",
"description": "Allow access when domain check passes",
"effect": "allow",
"resources": ["All"],
"operations": ["All"],
"condition": "hasDomain()"
}
]'::jsonb
)
WHERE name = 'DomainOnlyAccessPolicy';