protected void validateAccess(ActionMessages errors, UserVO activeUser, EntityAccess testEntity) {
if(!EntityAccessUtility.isAccessGranted(activeUser, testEntity, EntityAccess.Access.WRITE_SYSTEM))
errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("module.generic.pageSystem.error.noRightsLeft"));
if(getPanel().getEntity() instanceof UserAssigned) {
UserAssigned userAssigned = (UserAssigned)getPanel().getEntity();
if(userAssigned.getAssignedUser() != null && !EntityAccessUtility.isAccessGranted(userAssigned.getAssignedUser(), testEntity, EntityAccess.Access.WRITE))
errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("module.generic.pageSystem.error.missingWriteAccessForAssignedUser", userAssigned.getAssignedUser().getUserName()));
}
}