Skip to content

Commit 4f153ab

Browse files
committed
improve logic
1 parent 9170411 commit 4f153ab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/Sparky/Security.rakumod

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ sub check-user (Mu $user, Mu $token, $project?) is export {
1919
if "{cache-root()}/users/{$user}/tokens/{$token}".IO ~ :f {
2020
#say "user $user, token - $token - validation passed";
2121
my $list = load-acl-list();
22-
return True unless $list; # in case no ACL, allow all authenticated users to do all
22+
# in case no ACL, allow all authenticated users to do all
23+
unless $list {
24+
say "check-user: no ACL found, allow user [$user] on default basis";
25+
return True
26+
}
2327
if $project &&
2428
$list<projects>{$project}<deny><users> &&
2529
$list<projects>{$project}<deny><users>.isa(List) &&

0 commit comments

Comments
 (0)