mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
remove current user check, because it does not work with apache shiro
This commit is contained in:
@@ -174,9 +174,7 @@ public class DefaultUserManager extends AbstractUserManager
|
|||||||
throw new ScmSecurityException("user is not authenticated");
|
throw new ScmSecurityException("user is not authenticated");
|
||||||
}
|
}
|
||||||
|
|
||||||
User currentUser = subject.getPrincipals().oneByType(User.class);
|
if (!subject.hasRole(Role.ADMIN))
|
||||||
|
|
||||||
if (!user.equals(currentUser) &&!subject.hasRole(Role.ADMIN))
|
|
||||||
{
|
{
|
||||||
throw new ScmSecurityException("admin account is required");
|
throw new ScmSecurityException("admin account is required");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user