diff options
| author | Frederick Muriuki Muriithi | 2026-03-11 13:04:43 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-03-11 13:04:43 -0500 |
| commit | 4d1269e40ab745580ba080c05d7cddfea87880d6 (patch) | |
| tree | ebb1ca01262ec0e325fcb0d555b333ca6cc07829 | |
| parent | 94bd70227b8fcd59573b01913712fba12c896597 (diff) | |
| download | gn-auth-4d1269e40ab745580ba080c05d7cddfea87880d6.tar.gz | |
Resources: make-public: Create new privilege.
Create the new 'system:resource:make-public' privilege to be used to restrict the ability of users to make their resources accessible by the general public.
| -rw-r--r-- | migrations/auth/20260311_03_vxBCX-restrict-access-to-resources-make-public-feature.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/migrations/auth/20260311_03_vxBCX-restrict-access-to-resources-make-public-feature.py b/migrations/auth/20260311_03_vxBCX-restrict-access-to-resources-make-public-feature.py new file mode 100644 index 0000000..94b7bde --- /dev/null +++ b/migrations/auth/20260311_03_vxBCX-restrict-access-to-resources-make-public-feature.py @@ -0,0 +1,20 @@ +""" +Restrict access to resources' 'Make Public' feature. +""" + +from yoyo import step + +__depends__ = {'20260311_02_v3EFQ-assign-systemwide-docs-editor-role-to-sysadmins'} + +steps = [ + step( + """ + INSERT INTO privileges(privilege_id, privilege_description) + VALUES( + 'system:resource:make-public', + 'Allow user to make a resource publicly accessible.') + """, + """ + DELETE FROM privileges WHERE privilege_id='system:resource:make-public' + """) +] |
