X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstemmaweb%2FController%2FRoot.pm;h=3ff836fb89fb006cf20692294cf25fe08992b750;hb=080f8a02e4af4c545e8ecff2166931e31b687683;hp=7e9ff2bd869e85abf8ca93cf613defb2eb95e719;hpb=04469f3e6a42a0e982ccc86ed7aa14731f87d717;p=scpubgit%2Fstemmaweb.git diff --git a/lib/stemmaweb/Controller/Root.pm b/lib/stemmaweb/Controller/Root.pm index 7e9ff2b..3ff836f 100644 --- a/lib/stemmaweb/Controller/Root.pm +++ b/lib/stemmaweb/Controller/Root.pm @@ -291,10 +291,11 @@ sub _check_permission { if( $user ) { return 'full' if ( $user->is_admin || ( $tradition->has_user && $tradition->user->id eq $user->id ) ); - } elsif( $tradition->public ) { - return 'readonly'; - } - # else Forbidden! + } + # Text doesn't belong to us, so maybe it's public? + return 'readonly' if $tradition->public; + + # ...nope. Forbidden! $c->response->status( 403 ); $c->response->body( 'You do not have permission to view this tradition.' ); $c->detach( 'View::Plain' );