summaryrefslogtreecommitdiff
path: root/share/gitano/skel/gitano-admin/rules/adminchecks.lace
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-07-14 15:10:09 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-07-14 15:10:09 +0000
commit160fd3f2f1d372751836c0073bdc944df1cfbb91 (patch)
treed6b46ce1ec600400883e53b82e12b390fa73f262 /share/gitano/skel/gitano-admin/rules/adminchecks.lace
parenteafba37e2bfc3897e3e7f65f2ce087fbee358f43 (diff)
parentd349c9a35d3d53ebfc9f26df373e84fa5986a1b6 (diff)
downloadtrove-setup-160fd3f2f1d372751836c0073bdc944df1cfbb91.tar.gz
Merge branch 'baserock/pedroalvarez/trove-ansible3'
Reviewed-by: Richard Maw Reviewed-by: Lars Wirzenius
Diffstat (limited to 'share/gitano/skel/gitano-admin/rules/adminchecks.lace')
-rw-r--r--share/gitano/skel/gitano-admin/rules/adminchecks.lace25
1 files changed, 25 insertions, 0 deletions
diff --git a/share/gitano/skel/gitano-admin/rules/adminchecks.lace b/share/gitano/skel/gitano-admin/rules/adminchecks.lace
new file mode 100644
index 0000000..ffe99a0
--- /dev/null
+++ b/share/gitano/skel/gitano-admin/rules/adminchecks.lace
@@ -0,0 +1,25 @@
+# _____
+# |_ _| __ _____ _____
+# | || '__/ _ \ \ / / _ \
+# | || | | (_) \ V / __/
+# |_||_| \___/ \_/ \___|
+#
+# Copyright 2012 Codethink Limited
+#
+# Core project administration rules
+
+# Called with ref known to be refs/gitano/admin
+
+# Administrators already got to do anything, so this is for non-admins
+
+# Non-admin members may not delete the admin ref
+deny "Non-administrators may not delete the admin ref" op_deleteref
+
+# Otherwise, the project's owner is allowed to alter the admin tree
+allow "Project owner may alter the admin ref" is_owner repo_is_personal
+
+# Project admins may alter admin refs
+allow "Project admins may alter the admin ref of project repos" repo_is_local_project project_admin
+
+# Any other opportunities for altering the admin ref must be provided
+# by the project's rules