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=cdc9fc8868ab60eccf0f57356a293a6bacc4e2f7;p=scpubgit%2Fstemmaweb.git ...and apply first ACL bugfix to relater/stexaminer --- diff --git a/lib/stemmaweb/Controller/Relation.pm b/lib/stemmaweb/Controller/Relation.pm index 357b9ca..2e9d444 100644 --- a/lib/stemmaweb/Controller/Relation.pm +++ b/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/lib/stemmaweb/Controller/Stexaminer.pm b/lib/stemmaweb/Controller/Stexaminer.pm index 86020a1..36679ee 100644 --- a/lib/stemmaweb/Controller/Stexaminer.pm +++ b/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?