use of org.apache.archiva.redback.rbac.UserAssignment in project archiva by apache.
the class AbstractSecurityTest method restoreGuestInitialValues.
protected void restoreGuestInitialValues(String userId) throws Exception {
UserAssignment userAssignment = null;
try {
userAssignment = rbacManager.getUserAssignment(userId);
} catch (RbacObjectNotFoundException e) {
log.info("ignore RbacObjectNotFoundException for id {} during restoreGuestInitialValues", userId);
return;
}
userAssignment.setRoleNames(Lists.newArrayList("Guest"));
rbacManager.saveUserAssignment(userAssignment);
CacheManager.getInstance().clearAll();
}
Aggregations