@Override public void invalidateUser(final String username, final CallContext callContext) throws SecurityApiException { userDao.invalidateUser(username, callContext.getUserName()); }
@Override public String getUserName() { return auditLogModelDao.getCallContext().getUserName(); }
@Override public void addUserRoles(final String username, final String password, final List<String> roles, final CallContext callContext) throws SecurityApiException { userDao.insertUser(username, password, roles, callContext.getUserName()); }
@Override public void updateUserPassword(final String username, final String password, final CallContext callContext) throws SecurityApiException { userDao.updateUserPassword(username, password, callContext.getUserName()); }
@Override public String getUserName() { return delegate.getUserName(); }
@Override public void updateRoleDefinition(final String role, final List<String> permissions, final CallContext callContext) throws SecurityApiException { final List<String> sanitizedPermissions = sanitizeAndValidatePermissions(permissions); userDao.updateRoleDefinition(role, sanitizedPermissions, callContext.getUserName()); }
@Override public void addRoleDefinition(final String role, final List<String> permissions, final CallContext callContext) throws SecurityApiException { final List<String> sanitizedPermissions = sanitizeAndValidatePermissions(permissions); userDao.addRoleDefinition(role, sanitizedPermissions, callContext.getUserName()); }
@Override public void updateUserRoles(final String username, final List<String> roles, final CallContext callContext) throws SecurityApiException { userDao.updateUserRoles(username, roles, callContext.getUserName()); invalidateJDBCAuthorizationCache(username); }
public InternalCallContext(final Long tenantRecordId, final CallContext callContext, final DateTime utcNow) { this(tenantRecordId, null, null, null, callContext.getUserToken(), callContext.getUserName(), callContext.getCallOrigin(), callContext.getUserType(), callContext.getReasonCode(), callContext.getComments(), utcNow, utcNow); }
public TestCallContext(final CallContext context, final DateTime utcNow) { this.userName = context.getUserName(); this.createdDate = utcNow; this.updatedDate = utcNow; this.userToken = context.getUserToken(); this.accountId = context.getAccountId(); this.tenantId = context.getTenantId(); }
public DefaultCallContext(final CallContext callContext) { super(callContext.getAccountId(), callContext.getTenantId(), callContext.getUserName(), callContext.getCallOrigin(), callContext.getUserType(), callContext.getReasonCode(), callContext.getComments(), callContext.getUserToken()); this.createdDate = callContext.getCreatedDate(); this.updateDate = callContext.getUpdatedDate(); }
/** * Create an internal call callcontext from a call callcontext, and retrieving the account_record_id from another table * * @param objectId the id of the row in the table pointed by object type where to look for account_record_id * @param objectType the object type pointed by this objectId * @param context original call callcontext * @return internal call callcontext from callcontext, with a non null account_record_id (if found) */ public InternalCallContext createInternalCallContext(final UUID objectId, final ObjectType objectType, final CallContext context) { // The callcontext may come from a user API - for security, check we're not doing cross-tenants operations //final Long tenantRecordIdFromObject = retrieveTenantRecordIdFromObject(objectId, objectType); //final Long tenantRecordIdFromContext = getTenantRecordIdSafe(callcontext); //Preconditions.checkState(tenantRecordIdFromContext.equals(tenantRecordIdFromObject), // "tenant of the pointed object (%s) and the callcontext (%s) don't match!", tenantRecordIdFromObject, tenantRecordIdFromContext); final Long tenantRecordId = getTenantRecordIdSafe(context); final Long accountRecordId = getAccountRecordIdSafe(objectId, objectType, context); return createInternalCallContext(tenantRecordId, accountRecordId, context.getUserName(), context.getCallOrigin(), context.getUserType(), context.getUserToken(), context.getReasonCode(), context.getComments(), context.getCreatedDate(), context.getUpdatedDate()); }
@Override public void addUserRoles(final String username, final String password, final List<String> roles, final CallContext callContext) throws SecurityApiException { userDao.insertUser(username, password, roles, callContext.getUserName()); }
@Override public String getUserName() { return delegate.getUserName(); }
@Override public String getUserName() { return auditLogModelDao.getCallContext().getUserName(); }
@Override public void updateRoleDefinition(final String role, final List<String> permissions, final CallContext callContext) throws SecurityApiException { final List<String> sanitizedPermissions = sanitizeAndValidatePermissions(permissions); userDao.updateRoleDefinition(role, sanitizedPermissions, callContext.getUserName()); }
@Override public void updateUserRoles(final String username, final List<String> roles, final CallContext callContext) throws SecurityApiException { userDao.updateUserRoles(username, roles, callContext.getUserName()); invalidateJDBCAuthorizationCache(username); }
@Override public void addRoleDefinition(final String role, final List<String> permissions, final CallContext callContext) throws SecurityApiException { final List<String> sanitizedPermissions = sanitizeAndValidatePermissions(permissions); userDao.addRoleDefinition(role, sanitizedPermissions, callContext.getUserName()); }
public TestCallContext(final CallContext context, final DateTime utcNow) { this.userName = context.getUserName(); this.createdDate = utcNow; this.updatedDate = utcNow; this.userToken = context.getUserToken(); this.accountId = context.getAccountId(); this.tenantId = context.getTenantId(); }
public DefaultCallContext(final CallContext callContext) { super(callContext.getAccountId(), callContext.getTenantId(), callContext.getUserName(), callContext.getCallOrigin(), callContext.getUserType(), callContext.getReasonCode(), callContext.getComments(), callContext.getUserToken()); this.createdDate = callContext.getCreatedDate(); this.updateDate = callContext.getUpdatedDate(); }