another ACL logic fix
[scpubgit/stemmaweb.git] / lib / stemmaweb / Controller / Stexaminer.pm
index d40ecbc..86020a1 100644 (file)
@@ -104,16 +104,17 @@ sub _check_permission {
        $c->stash->{'permission'} = 'full'
                if( $user->is_admin || $tradition->user->id eq $user->id );
        return 1;
-    } elsif( $tradition->public ) {
+    } 
+    # Is it public?
+    if( $tradition->public ) {
        $c->stash->{'permission'} = 'readonly';
        return 1;
-    } else {
-       # Forbidden!
-       $c->response->status( 403 );
-       $c->response->body( 'You do not have permission to view this tradition.' );
-       $c->detach( 'View::Plain' );
-       return 0;
-    }
+    } 
+       # Forbidden!
+       $c->response->status( 403 );
+       $c->response->body( 'You do not have permission to view this tradition.' );
+       $c->detach( 'View::Plain' );
+       return 0;
 }
 
 =head2 graphsvg