use of org.usermanagement.model.UserInfo in project open-kilda by telstra.
the class UserActivityLogService method getActivityInfo.
/**
* Gets the activity types and users info.
*
* @return the ActivityInfo
*/
public ActivityInfo getActivityInfo() {
ActivityInfo activityInfo = new ActivityInfo();
List<ActivityTypeInfo> activityTypeInfos = LogConversionUtil.getActivityTypeInfo();
List<UserInfo> userInfos = userService.getAllUsers();
activityInfo.setActivityTypeInfo(activityTypeInfos);
activityInfo.setUserInfo(userInfos);
return activityInfo;
}
use of org.usermanagement.model.UserInfo in project open-kilda by telstra.
the class UserService method getLoggedInUserInfo.
/**
* Gets the logged in user info.
*
* @return the logged in user info
* @throws AccessDeniedException the access denied exception
*/
public UserInfo getLoggedInUserInfo() throws AccessDeniedException {
RequestContext requestContext = serverContext.getRequestContext();
if (requestContext.getUserId() == null) {
throw new AccessDeniedException(messageUtils.getUnauthorizedMessage());
}
UserInfo userInfo = new UserInfo();
userInfo.setUserId(requestContext.getUserId());
userInfo.setUsername(requestContext.getUserName());
userInfo.setIs2FaEnabled(requestContext.getIs2FaEnabled());
userInfo.setStatus(requestContext.getStatus());
userInfo.setName(requestContext.getFullName());
userInfo.setPermissions(requestContext.getPermissions());
return userInfo;
}
Aggregations