From: Tara L Andrews Date: Fri, 31 Aug 2012 22:07:19 +0000 (+0200) Subject: ...and apply first ACL bugfix to relater/stexaminer X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a55f7ff644dfcf1a3dd1c212f8b9a10836797e1f;p=scpubgit%2Fstemmatology.git ...and apply first ACL bugfix to relater/stexaminer --- diff --git a/stemmaweb/lib/stemmaweb/Controller/Relation.pm b/stemmaweb/lib/stemmaweb/Controller/Relation.pm index 357b9ca..2e9d444 100644 --- a/stemmaweb/lib/stemmaweb/Controller/Relation.pm +++ b/stemmaweb/lib/stemmaweb/Controller/Relation.pm @@ -381,7 +381,8 @@ sub _check_permission { my $user = $c->user_exists ? $c->user->get_object : undef; if( $user ) { $c->stash->{'permission'} = 'full' - if( $user->is_admin || $tradition->user->id eq $user->id ); + if( $user->is_admin || + ( $tradition->has_user && $tradition->user->id eq $user->id ) ); return 1; } # Is it public? diff --git a/stemmaweb/lib/stemmaweb/Controller/Stexaminer.pm b/stemmaweb/lib/stemmaweb/Controller/Stexaminer.pm index 86020a1..36679ee 100644 --- a/stemmaweb/lib/stemmaweb/Controller/Stexaminer.pm +++ b/stemmaweb/lib/stemmaweb/Controller/Stexaminer.pm @@ -102,7 +102,8 @@ sub _check_permission { my $user = $c->user_exists ? $c->user->get_object : undef; if( $user ) { $c->stash->{'permission'} = 'full' - if( $user->is_admin || $tradition->user->id eq $user->id ); + if( $user->is_admin || + ( $tradition->has_user && $tradition->user->id eq $user->id ) ); return 1; } # Is it public?