|
|
|
@ -87,7 +87,7 @@ public class User extends REST<CKANUser> implements org.gcube.gcat.api.interface
|
|
|
|
|
if(user.getRoles().contains(Role.MANAGER.getPortalRole())) {
|
|
|
|
|
CKANUserCache.removeUserFromCache();
|
|
|
|
|
}else {
|
|
|
|
|
throw new ForbiddenException("Only " + Role.MANAGER.getCkanRole() + "s are authorized to remove an user from the cache");
|
|
|
|
|
throw new ForbiddenException("Only " + Role.MANAGER.getPortalRole() + "s are authorized to remove an user from the cache");
|
|
|
|
|
}
|
|
|
|
|
return Response.status(Status.NO_CONTENT).build();
|
|
|
|
|
}
|
|
|
|
@ -101,7 +101,7 @@ public class User extends REST<CKANUser> implements org.gcube.gcat.api.interface
|
|
|
|
|
if(user.getRoles().contains(Role.MANAGER.getPortalRole())) {
|
|
|
|
|
CKANUserCache.removeUserFromCache(username);
|
|
|
|
|
}else {
|
|
|
|
|
throw new ForbiddenException("Only " + Role.MANAGER.getCkanRole() + "s are authorized to remove an user from the cache");
|
|
|
|
|
throw new ForbiddenException("Only " + Role.MANAGER.getPortalRole() + "s are authorized to remove an user from the cache");
|
|
|
|
|
}
|
|
|
|
|
return Response.status(Status.NO_CONTENT).build();
|
|
|
|
|
}
|
|
|
|
|