use of cz.metacentrum.perun.audit.events.UserManagerEvents.UserExtSourceUpdated in project perun by CESNET.
the class UsersManagerBlImpl method updateUserExtSourceLastAccess.
@Override
public void updateUserExtSourceLastAccess(PerunSession sess, UserExtSource userExtSource) {
getUsersManagerImpl().updateUserExtSourceLastAccess(sess, userExtSource);
getPerunBl().getAuditer().log(sess, new UserExtSourceUpdated(userExtSource));
}
use of cz.metacentrum.perun.audit.events.UserManagerEvents.UserExtSourceUpdated in project perun by CESNET.
the class urn_perun_user_attribute_def_virt_loa method resolveVirtualAttributeValueChange.
@Override
public List<AuditEvent> resolveVirtualAttributeValueChange(PerunSessionImpl sess, AuditEvent message) throws AttributeNotExistsException, WrongAttributeAssignmentException {
List<AuditEvent> resolvingMessages = new ArrayList<>();
if (message == null)
return resolvingMessages;
User user = null;
try {
if (message instanceof UserExtSourceAddedToUser) {
user = ((UserExtSourceAddedToUser) message).getUser();
sess.getPerunBl().getUsersManagerBl().checkUserExists(sess, user);
resolvingMessages.add(resolveEvent(sess, user));
} else if (message instanceof UserExtSourceRemovedFromUser) {
user = ((UserExtSourceRemovedFromUser) message).getUser();
sess.getPerunBl().getUsersManagerBl().checkUserExists(sess, user);
resolvingMessages.add(resolveEvent(sess, user));
} else if (message instanceof UserExtSourceUpdated) {
resolvingMessages.add(resolveEvent(sess, sess.getPerunBl().getUsersManagerBl().getUserById(sess, ((UserExtSourceUpdated) message).getUserExtSource().getUserId())));
}
} catch (UserNotExistsException e) {
log.warn("User {} associated with event {} no longer exists while resolving virtual attribute value change for LoA.", user, message.getName());
}
return resolvingMessages;
}
use of cz.metacentrum.perun.audit.events.UserManagerEvents.UserExtSourceUpdated in project perun by CESNET.
the class UsersManagerBlImpl method updateUserExtSource.
@Override
public UserExtSource updateUserExtSource(PerunSession sess, UserExtSource userExtSource) throws UserExtSourceExistsException {
UserExtSource updatedUes = getUsersManagerImpl().updateUserExtSource(sess, userExtSource);
getPerunBl().getAuditer().log(sess, new UserExtSourceUpdated(userExtSource));
return updatedUes;
}
Aggregations