From 92f453fe8b1e1b1b2991f311576e610793e29d5b Mon Sep 17 00:00:00 2001 From: Jon Robertson Date: Tue, 27 May 2014 11:28:35 -0700 Subject: Added /cron principals to Stanford policy and summary cron principals were being rejected due to not being a part of the Stanford Policy module. Change-Id: Ic67a8e2bce8474431163b74d97c2bf1fb184a4b7 Reviewed-on: https://gerrit.stanford.edu/1488 Reviewed-by: Russ Allbery Tested-by: Russ Allbery --- perl/Wallet/Policy/Stanford.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'perl/Wallet/Policy') diff --git a/perl/Wallet/Policy/Stanford.pm b/perl/Wallet/Policy/Stanford.pm index 8bf4257..5ac29e0 100644 --- a/perl/Wallet/Policy/Stanford.pm +++ b/perl/Wallet/Policy/Stanford.pm @@ -279,6 +279,11 @@ sub verify_name { and $principal !~ /^(class|dept|group)-[a-z0-9_-]+$/) { return "invalid CGI principal name $name"; } + } elsif ($instance eq 'cron') { + if ($principal !~ /^[a-z][a-z0-9]{1,7}$/ + and $principal !~ /^(class|dept|group)-[a-z0-9_-]+$/) { + return "invalid cron principal name $name"; + } } else { return "unknown principal type $principal"; } -- cgit v1.2.3