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

25 lines
791 B
MySQL
Raw Normal View History

-- Update DomainOnlyAccessPolicy with new rules structure
UPDATE policy_entity
SET json = JSON_SET(
json,
'$.rules',
JSON_ARRAY(
JSON_OBJECT(
'name', 'DomainAccessDenyRule',
'description', 'Deny access when domain check fails',
'effect', 'deny',
'resources', JSON_ARRAY('All'),
'operations', JSON_ARRAY('All'),
'condition', '!hasDomain()'
),
JSON_OBJECT(
'name', 'DomainAccessAllowRule',
'description', 'Allow access when domain check passes',
'effect', 'allow',
'resources', JSON_ARRAY('All'),
'operations', JSON_ARRAY('All'),
'condition', 'hasDomain()'
)
)
)
WHERE name = 'DomainOnlyAccessPolicy';