Skip to content

Commit

Permalink
BZ-1175682: a bad fix for BZ-1122594, blocked any user that had 'user'
Browse files Browse the repository at this point in the history
or 'manager' roles
  • Loading branch information
porcelli committed Jan 14, 2015
1 parent cc2a268 commit 85ce297
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -23,11 +23,10 @@ public boolean authorize( final Resource resource,
}

private boolean checkRole( final User subject ) {
if ( subject.getRoles().contains( new RoleImpl( USER.toString() ) ) || subject.getRoles().contains( new RoleImpl( MANAGER.toString() ) ) ) {
if ( subject.getRoles().contains( new RoleImpl( ADMIN.toString() ) ) || subject.getRoles().contains( new RoleImpl( DEVELOPER.toString() ) ) ||
subject.getRoles().contains( new RoleImpl( ANALYST.toString() ) ) ) {
return true;
}
if ( subject.getRoles().contains( new RoleImpl( ADMIN.toString() ) ) ||
subject.getRoles().contains( new RoleImpl( DEVELOPER.toString() ) ) ||
subject.getRoles().contains( new RoleImpl( ANALYST.toString() ) ) ) {
return true;
}
return false;
}
Expand Down

0 comments on commit 85ce297

Please sign in to comment.