about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--migrations/auth/20260311_03_vxBCX-restrict-access-to-resources-make-public-feature.py20
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'
+        """)
+]