This commit is contained in:
Massimiliano Assante 2022-10-19 17:11:15 +02:00
parent 1003c32ffc
commit 93d7af4473
2 changed files with 3 additions and 3 deletions

View File

@ -362,7 +362,7 @@ public class Notifications {
GCubeUser jarvis = UserManagerWSBuilder.getInstance().getUserManager().getUserByEmail(LiferayJSONWsCredentials.getSingleton().getUser());
SecurityTokenProvider.instance.set(LiferayJSONWsCredentials.getSingleton().getNotifierUserToken());
username = jarvis.getUsername();
fullName = "Catalogue" + "("+caller.getClient().getId()+")"; // the actual name of the IAM Client
fullName = caller.getClient().getId(); // the actual name of the IAM Client
senderUser = um.getUserByUsername(username);
user = new SocialNetworkingUser(senderUser.getUsername(), senderUser.getEmail(), fullName, senderUser.getUserAvatarURL());
}else{

View File

@ -48,8 +48,8 @@ public class TokensUtils {
* @return a boolean value
*/
public static boolean isUserToken(Caller caller){
return caller.getClient().getType().equals(ClientType.USER);
String username = caller.getClient().getId();
return !username.startsWith("service-account-");
}