Skip to content
Snippets Groups Projects
Verified Commit 92e6e49b authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Pridan ACL na zaklade role

parent 95f8b56d
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ sub user_acl { ...@@ -22,7 +22,7 @@ sub user_acl {
$grants->{ $stream->key} = 1; #TODO: read|write $grants->{ $stream->key} = 1; #TODO: read|write
} }
# na zaklade role # na zaklade clenstvi ve skupine, role nebo user.id
my $acls = $class->search( my $acls = $class->search(
{ {
...@@ -30,6 +30,10 @@ sub user_acl { ...@@ -30,6 +30,10 @@ sub user_acl {
{ {
class => 'all', class => 'all',
}, },
{
class => 'group',
value => { '-in' => $user->{groups} // [] },
},
{ {
class => 'role', class => 'role',
value => { '-in' => $user->{roles} // [] }, value => { '-in' => $user->{roles} // [] },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment