Search in sources :

Example 41 with InsufficientPermissionException

use of org.akaza.openclinica.web.InsufficientPermissionException in project OpenClinica by OpenClinica.

the class ViewRuleAssignmentNewServlet method mayProceed.

@Override
public void mayProceed() throws InsufficientPermissionException {
    locale = LocaleResolver.getLocale(request);
    if (ub.isSysAdmin()) {
        return;
    }
    Role r = currentRole.getRole();
    if (r.equals(Role.STUDYDIRECTOR) || r.equals(Role.COORDINATOR)) {
        return;
    }
    addPageMessage(respage.getString("no_have_correct_privilege_current_study") + respage.getString("change_study_contact_sysadmin"));
    throw new InsufficientPermissionException(Page.MENU_SERVLET, resexception.getString("may_not_submit_data"), "1");
}
Also used : Role(org.akaza.openclinica.bean.core.Role) InsufficientPermissionException(org.akaza.openclinica.web.InsufficientPermissionException)

Example 42 with InsufficientPermissionException

use of org.akaza.openclinica.web.InsufficientPermissionException in project OpenClinica by OpenClinica.

the class VerifyImportedRuleServlet method mayProceed.

@Override
public void mayProceed() throws InsufficientPermissionException {
    locale = LocaleResolver.getLocale(request);
    if (ub.isSysAdmin()) {
        return;
    }
    Role r = currentRole.getRole();
    if (r.equals(Role.STUDYDIRECTOR) || r.equals(Role.COORDINATOR) || r.equals(Role.INVESTIGATOR) || r.equals(Role.RESEARCHASSISTANT) || r.equals(Role.RESEARCHASSISTANT2)) {
        return;
    }
    addPageMessage(respage.getString("no_have_correct_privilege_current_study") + respage.getString("change_study_contact_sysadmin"));
    throw new InsufficientPermissionException(Page.MENU_SERVLET, resexception.getString("may_not_submit_data"), "1");
}
Also used : Role(org.akaza.openclinica.bean.core.Role) InsufficientPermissionException(org.akaza.openclinica.web.InsufficientPermissionException)

Example 43 with InsufficientPermissionException

use of org.akaza.openclinica.web.InsufficientPermissionException in project OpenClinica by OpenClinica.

the class ViewRuleAssignmentServlet method mayProceed.

@Override
public void mayProceed() throws InsufficientPermissionException {
    locale = LocaleResolver.getLocale(request);
    if (ub.isSysAdmin()) {
        return;
    }
    Role r = currentRole.getRole();
    if (r.equals(Role.STUDYDIRECTOR) || r.equals(Role.COORDINATOR) || r.equals(Role.INVESTIGATOR) || r.equals(Role.RESEARCHASSISTANT) || r.equals(Role.RESEARCHASSISTANT2)) {
        return;
    }
    addPageMessage(respage.getString("no_have_correct_privilege_current_study") + respage.getString("change_study_contact_sysadmin"));
    throw new InsufficientPermissionException(Page.MENU_SERVLET, resexception.getString("may_not_submit_data"), "1");
}
Also used : Role(org.akaza.openclinica.bean.core.Role) InsufficientPermissionException(org.akaza.openclinica.web.InsufficientPermissionException)

Aggregations

InsufficientPermissionException (org.akaza.openclinica.web.InsufficientPermissionException)43 Role (org.akaza.openclinica.bean.core.Role)25 FormProcessor (org.akaza.openclinica.control.form.FormProcessor)14 UserAccountBean (org.akaza.openclinica.bean.login.UserAccountBean)12 StudyUserRoleBean (org.akaza.openclinica.bean.login.StudyUserRoleBean)10 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)10 ArrayList (java.util.ArrayList)8 StudyEventBean (org.akaza.openclinica.bean.managestudy.StudyEventBean)8 StudyEventDAO (org.akaza.openclinica.dao.managestudy.StudyEventDAO)8 StudyDAO (org.akaza.openclinica.dao.managestudy.StudyDAO)7 EventCRFBean (org.akaza.openclinica.bean.submit.EventCRFBean)6 StudySubjectDAO (org.akaza.openclinica.dao.managestudy.StudySubjectDAO)6 HttpSession (javax.servlet.http.HttpSession)5 StudyEventDefinitionBean (org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean)5 StudyEventDefinitionDAO (org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO)5 EventCRFDAO (org.akaza.openclinica.dao.submit.EventCRFDAO)5 DateFormat (java.text.DateFormat)4 Date (java.util.Date)4 HashMap (java.util.HashMap)4 List (java.util.List)4