Fixed code
This commit is contained in:
parent
2f6cd311ba
commit
e31405850a
|
@ -152,7 +152,7 @@ public class User extends REST<CKANUser> implements org.gcube.gcat.api.interface
|
||||||
public Response removeUserFromCache(@PathParam(GCUBE_USERNAME_PARAMETER) String username) {
|
public Response removeUserFromCache(@PathParam(GCUBE_USERNAME_PARAMETER) String username) {
|
||||||
SecretManager secretManager = SecretManagerProvider.instance.get();
|
SecretManager secretManager = SecretManagerProvider.instance.get();
|
||||||
org.gcube.common.authorization.utils.user.User user = secretManager.getUser();
|
org.gcube.common.authorization.utils.user.User user = secretManager.getUser();
|
||||||
if(user.getRoles().contains(Role.MANAGER.getPortalRole()) || user.getUsername().compareToIgnoreCase(username)==0) {
|
if(user.getRoles().contains(Role.MANAGER.getPortalRole()) || user.getUsername().compareTo(username)==0) {
|
||||||
// Any user can remove self from cache
|
// Any user can remove self from cache
|
||||||
CKANUserCache.removeUserFromCache(username);
|
CKANUserCache.removeUserFromCache(username);
|
||||||
}else {
|
}else {
|
||||||
|
|
Loading…
Reference in New Issue