/** * Only project admins and annotators can see this page */ @Override public boolean applies() { return SecurityUtil.annotationEnabeled(projectService, userRepo.getCurrentUser(), WebAnnoConst.PROJECT_TYPE_AUTOMATION); }
/** * Only project admins and curators can see this page */ @Override public boolean applies() { return SecurityUtil.curationEnabeled(projectService, userRepo.getCurrentUser()); }
@Override protected void onConfigure() { super.onConfigure(); setEnabled(isProfileSelfServiceAllowed()); }
!annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_ANNOTATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_AUTOMATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_CORRECTION) && !curationEnabeled(projectService, user))
/** * Only admins and project managers can see this page */ @Override public boolean applies() { return SecurityUtil.monitoringEnabeled(projectService, userRepo.getCurrentUser()); }
!annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_ANNOTATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_AUTOMATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_CORRECTION) && !curationEnabeled(projectService, user))
/** * Only admins and project managers can see this page */ @Override public boolean applies() { return SecurityUtil.monitoringEnabeled(projectService, userRepo.getCurrentUser()); }
!annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_ANNOTATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_AUTOMATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_CORRECTION) && !curationEnabeled(projectService, user))
/** * Only project admins and annotators can see this page */ @Override public boolean applies() { return annotationEnabeled(projectService, userRepo.getCurrentUser(), WebAnnoConst.PROJECT_TYPE_ANNOTATION); }
/** * Only project admins and curators can see this page */ @Override public boolean applies() { return SecurityUtil.curationEnabeled(projectService, userRepo.getCurrentUser()); }
@Override protected void onConfigure() { super.onConfigure(); setEnabled(isProfileSelfServiceAllowed()); }
!annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_ANNOTATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_AUTOMATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_CORRECTION) && !curationEnabeled(projectService, user))
/** * Only project admins and annotators can see this page */ @Override public boolean applies() { return SecurityUtil.annotationEnabeled(projectService, userRepo.getCurrentUser(), WebAnnoConst.PROJECT_TYPE_AUTOMATION); }
public ManageUsersPage() { super(); commonInit(); // If the user is not an admin, then pre-load the current user to allow self-service // editing of the profile if (!isAdmin() && SecurityUtil.isProfileSelfServiceAllowed()) { selectedUser.setObject(userRepository.getCurrentUser()); } }
!annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_ANNOTATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_AUTOMATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_CORRECTION) && !curationEnabeled(projectService, user))
/** * Only project admins and annotators can see this page */ @Override public boolean applies() { return annotationEnabeled(projectService, userRepo.getCurrentUser(), WebAnnoConst.PROJECT_TYPE_CORRECTION); }
public ManageUsersPage() { super(); commonInit(); // If the user is not an admin, then pre-load the current user to allow self-service // editing of the profile if (!isAdmin() && SecurityUtil.isProfileSelfServiceAllowed()) { selectedUser.setObject(userRepository.getCurrentUser()); } }
!annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_ANNOTATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_AUTOMATION) && !annotationEnabeled(projectService, user, WebAnnoConst.PROJECT_TYPE_CORRECTION) && !curationEnabeled(projectService, user))
public ManageUsersPage(final PageParameters aPageParameters) { super(aPageParameters); commonInit(); String username = aPageParameters.get(PARAM_USER).toOptionalString(); User user = null; if (username != null) { user = userRepository.get(username); } if (user != null) { if (isAdmin()) { selectedUser.setObject(user); } else if (SecurityUtil.isProfileSelfServiceAllowed() && userRepository.getCurrentUser().getUsername().equals(user.getUsername())) { selectedUser.setObject(userRepository.getCurrentUser()); } else { // Make sure a user doesn't try to access the profile of another user via the // parameter if self-service is turned on. setResponsePage(getApplication().getHomePage()); } } }
public ManageUsersPage(final PageParameters aPageParameters) { super(aPageParameters); commonInit(); String username = aPageParameters.get(PARAM_USER).toOptionalString(); User user = null; if (username != null) { user = userRepository.get(username); } if (user != null) { if (isAdmin()) { selectedUser.setObject(user); } else if (SecurityUtil.isProfileSelfServiceAllowed() && userRepository.getCurrentUser().getUsername().equals(user.getUsername())) { selectedUser.setObject(userRepository.getCurrentUser()); } else { // Make sure a user doesn't try to access the profile of another user via the // parameter if self-service is turned on. setResponsePage(getApplication().getHomePage()); } } }