]> git.plutz.net Git - busy/blobdiff - auth/acl.sh
introduced simple acl engine
[busy] / auth / acl.sh
diff --git a/auth/acl.sh b/auth/acl.sh
new file mode 100755 (executable)
index 0000000..10492dd
--- /dev/null
@@ -0,0 +1,11 @@
+ANL_EDITINTRO="paul"
+ANL_ADDNEWS="paul"
+ANL_EDITNEWS="paul"
+ANL_CREATETASK=".*"
+
+[ -n "$REMOTE_USER" ] && USER="$REMOTE_USER" || USER="#NONE#"
+egrep -xq "$ANL_EDITINTRO"  <<<"$USER" && ACL_EDITINTRO=true
+egrep -xq "$ANL_ADDNEWS"    <<<"$USER" && ACL_ADDNEWS=true
+egrep -xq "$ANL_EDITNEWS"   <<<"$USER" && ACL_EDITNEWS=true
+egrep -xq "$ANL_CREATETASK" <<<"$USER" && ACL_CREATETASK=true
+