From 92e6e49b53826236dc33e7552bf721e6649d7f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz> Date: Wed, 24 Jun 2020 01:28:49 +0200 Subject: [PATCH] Pridan ACL na zaklade role --- lib/PiTube/Schema/ResultSet/ACL.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/PiTube/Schema/ResultSet/ACL.pm b/lib/PiTube/Schema/ResultSet/ACL.pm index 7c3e39f..2d8c4a6 100644 --- a/lib/PiTube/Schema/ResultSet/ACL.pm +++ b/lib/PiTube/Schema/ResultSet/ACL.pm @@ -22,7 +22,7 @@ sub user_acl { $grants->{ $stream->key} = 1; #TODO: read|write } - # na zaklade role + # na zaklade clenstvi ve skupine, role nebo user.id my $acls = $class->search( { @@ -30,6 +30,10 @@ sub user_acl { { class => 'all', }, + { + class => 'group', + value => { '-in' => $user->{groups} // [] }, + }, { class => 'role', value => { '-in' => $user->{roles} // [] }, -- GitLab