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 a18eff1 commit 7766ba9
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
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

1 comment on commit 7766ba9

@yurloc
Copy link
Member

@yurloc yurloc commented on 7766ba9 Jan 14, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify, the commit message should be "blocked any user that did not have 'user' or 'manager' roles".

I can confirm that I am able to successfully clone with the broken build after adding 'user' role to my user that already has 'admin' role. This change seems to fix it so that 'user' or 'manager' roles are no longer required. Thanks.

Please sign in to comment.