summaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-10-19 11:40:00 +0200
committerGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-10-19 11:40:00 +0200
commitd9fc214c094bdb4ae4f7a855a1cc61134a5b519e (patch)
treef74329a215ed6e86bb21cd055623e3705f92a3ce /run
parent40fa1d2fbd1e5feb9e0f8228288c9fb5e031932d (diff)
Finally works with permission checks
Diffstat (limited to 'run')
-rwxr-xr-xrun4
1 files changed, 3 insertions, 1 deletions
diff --git a/run b/run
index 01751a7..061b5a3 100755
--- a/run
+++ b/run
@@ -2,7 +2,9 @@
# echo check for permissions
set -l USER (whoami)
-#cat /srv/repos/permission | grep -E "^
+set matcher (string match -r -g "^.*'(.*)'\$" "$argv")
+cat /srv/repos/permissions | grep -q -E "^$matcher[1]:$USER"
+or exit 1;
# run command
/usr/bin/sudo -u git /usr/bin/git-shell -c "$argv"