Search in sources :

Example 16 with ActionLogRecord

use of edu.harvard.iq.dataverse.actionlogging.ActionLogRecord in project dataverse by IQSS.

the class ShibGroupServiceBean method save.

public ShibGroup save(String name, String shibIdpAttribute, String shibIdp) {
    ActionLogRecord alr = new ActionLogRecord(ActionLogRecord.ActionType.GlobalGroups, "shibCreate");
    alr.setInfo(name + ": " + shibIdp + "/" + shibIdpAttribute);
    ShibGroup institutionalGroup = new ShibGroup(name, shibIdpAttribute, shibIdp, groupService.getShibGroupProvider());
    em.persist(institutionalGroup);
    em.flush();
    ShibGroup merged = em.merge(institutionalGroup);
    actionLogSvc.log(alr);
    return merged;
}
Also used : ActionLogRecord(edu.harvard.iq.dataverse.actionlogging.ActionLogRecord)

Aggregations

ActionLogRecord (edu.harvard.iq.dataverse.actionlogging.ActionLogRecord)16 AuthenticatedUser (edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser)4 ApiToken (edu.harvard.iq.dataverse.authorization.users.ApiToken)3 Timestamp (java.sql.Timestamp)3 EJBException (javax.ejb.EJBException)3 NoResultException (javax.persistence.NoResultException)3 ConstraintViolationException (javax.validation.ConstraintViolationException)3 POST (javax.ws.rs.POST)3 Path (javax.ws.rs.Path)3 IOException (java.io.IOException)2 Calendar (java.util.Calendar)2 Date (java.util.Date)2 NonUniqueResultException (javax.persistence.NonUniqueResultException)2 Dataverse (edu.harvard.iq.dataverse.Dataverse)1 RoleAssignment (edu.harvard.iq.dataverse.RoleAssignment)1 Permission (edu.harvard.iq.dataverse.authorization.Permission)1 UserRecordIdentifier (edu.harvard.iq.dataverse.authorization.UserRecordIdentifier)1 AuthenticationProviderFactoryNotFoundException (edu.harvard.iq.dataverse.authorization.exceptions.AuthenticationProviderFactoryNotFoundException)1 AuthorizationSetupException (edu.harvard.iq.dataverse.authorization.exceptions.AuthorizationSetupException)1 BuiltinAuthenticationProvider (edu.harvard.iq.dataverse.authorization.providers.builtin.BuiltinAuthenticationProvider)1