Package org.sete.vo.common

Examples of org.sete.vo.common.UserPrivilegeVo


        menuPrivVo.setCreateProjectIdeaVisible(userVo.hasPrivilege(userPrivVo));
    }

    private void setProjectWorkspaceMenuPrivileges(SideMenuVo menuPrivVo, AuthenticatedUserVo userVo) {
        UserPrivilegeVo userPrivVo = new UserPrivilegeVo();

        // Create Project
        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.MANAGE_MY_PROJECT_KEY.getKey()));
        userPrivVo.setActionType(getReadWriteAction());

        boolean hasAccess = userVo.hasPrivilege(userPrivVo);
        menuPrivVo.setViewCreateProjectVisible(hasAccess);
        menuPrivVo.setViewMyProjectVisible(hasAccess);
        menuPrivVo.setUploadDocumentsVisible(hasAccess);
View Full Code Here


        menuPrivVo.setViewMyProjectVisible(hasAccess);
        menuPrivVo.setUploadDocumentsVisible(hasAccess);
    }

    private void setJudgeMenuPrivileges(SideMenuVo menuPrivVo, AuthenticatedUserVo userVo) {
        UserPrivilegeVo userPrivVo = new UserPrivilegeVo();

        // Judge Schedule
        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.MANAGE_JUDGE_SCHEDULE_KEY.getKey()));

        userPrivVo.setActionType(getReadAction());
        menuPrivVo.setViewJudgeScheduleVisible(userVo.hasPrivilege(userPrivVo));


        // Judge Results
        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.MANAGE_JUDGE_RESULTS_KEY.getKey()));

        // Read/Write Submit Results
        userPrivVo.setActionType(getReadWriteAction());
        menuPrivVo.setSubmitJudgingResultsVisible(userVo.hasPrivilege(userPrivVo));

        // Read Results
        userPrivVo.setActionType(getReadAction());
        menuPrivVo.setViewJudgingResultsReportVisible(userVo.hasPrivilege(userPrivVo));
    }
View Full Code Here

        userPrivVo.setActionType(getReadAction());
        menuPrivVo.setViewJudgingResultsReportVisible(userVo.hasPrivilege(userPrivVo));
    }

    private void setSponsorMenuPrivileges(SideMenuVo menuPrivVo, AuthenticatedUserVo userVo) {
        UserPrivilegeVo userPrivVo = new UserPrivilegeVo();

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.SPONSOR_PROJECT_KEY.getKey()));

        userPrivVo.setActionType(getReadWriteAction());
        menuPrivVo.setSponsorProjectsVisible(userVo.hasPrivilege(userPrivVo));

        userPrivVo = new UserPrivilegeVo();
        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.MANAGE_SPONSORED_PROJECT_KEY.getKey()));
        userPrivVo.setActionType(getReadAction());
        menuPrivVo.setViewSponsoredProjectsVisible(userVo.hasPrivilege(userPrivVo));
    }
View Full Code Here

        userPrivVo.setActionType(getReadAction());
        menuPrivVo.setViewSponsoredProjectsVisible(userVo.hasPrivilege(userPrivVo));
    }

    private void setSeteAdministratorMenuPrivileges(SideMenuVo menuPrivVo, AuthenticatedUserVo userVo) {
        UserPrivilegeVo userPrivVo = new UserPrivilegeVo();
        List<UserPrivilegeVo> privs = new ArrayList<UserPrivilegeVo>();

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.MANAGE_USERS_KEY.getKey()));
        userPrivVo.setActionType(getReadWriteAction());
        privs.add(userPrivVo);

        userPrivVo = new UserPrivilegeVo();
        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.MANAGE_ROLES_KEY.getKey()));
        userPrivVo.setActionType(getReadWriteAction());
        privs.add(userPrivVo);

        userPrivVo = new UserPrivilegeVo();
        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.VIEW_ALL_PROJECTS_KEY.getKey()));
        userPrivVo.setActionType(getReadWriteAction());
        privs.add(userPrivVo);

        userPrivVo = new UserPrivilegeVo();
        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.MANAGE_PROJECT_FILES_KEY.getKey()));
        userPrivVo.setActionType(getReadWriteAction());
        privs.add(userPrivVo);

        menuPrivVo.setUsingJediForce(userVo.hasPrivilege(privs));
    }
View Full Code Here

        menuPrivVo.setUsingJediForce(userVo.hasPrivilege(privs));
    }

    private void setUserAccountMenuPrivileges(SideMenuVo menuPrivVo, AuthenticatedUserVo userVo) {
        UserPrivilegeVo userPrivVo = new UserPrivilegeVo();

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.MANAGE_MY_PROFILE_KEY.getKey()));

        userPrivVo.setActionType(getReadWriteAction());
        menuPrivVo.setCreateUserProfileVisible(userVo.hasPrivilege(userPrivVo));
    }
View Full Code Here

        userPrivVo.setActionType(getReadWriteAction());
        menuPrivVo.setCreateUserProfileVisible(userVo.hasPrivilege(userPrivVo));
    }

    private void setProjectCategoryMenuPrivileges(SideMenuVo menuPrivVo, AuthenticatedUserVo userVo) {
        UserPrivilegeVo userPrivVo = new UserPrivilegeVo();

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.MANAGE_REFERENCE_DATA_KEY.getKey()));

        userPrivVo.setActionType(getReadWriteAction());
        menuPrivVo.setUsingJediForce(userVo.hasPrivilege(userPrivVo));
    }
View Full Code Here

public class ModifyRolesAction extends SeteAction
{
    public ActionForward init(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) throws Exception
    {
      UserPrivilegeVo vo = new UserPrivilegeVo();
      vo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                            UserPrivilegeType.Key.MANAGE_ROLES_KEY.getKey()));
      vo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                         PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));
     
      checkAuthorization(userHasPrivilege(request.getSession(), vo));
     
      return mapping.findForward(WebConstants.FORWARD_VIEW);
View Full Code Here

   
    public ActionForward modifyAssignedPrivileges(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response) throws Exception
    {
   
        UserPrivilegeVo vo = new UserPrivilegeVo();
        vo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                            UserPrivilegeType.Key.MANAGE_ROLES_KEY.getKey()));
        vo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                         PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));
       
        checkAuthorization(userHasPrivilege(request.getSession(), vo));
       
        //prepare the data for the next screen
View Full Code Here

    public ActionForward saveAssignedPrivileges(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response) throws Exception
    {
       
        UserPrivilegeVo vo = new UserPrivilegeVo();
        vo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                            UserPrivilegeType.Key.MANAGE_ROLES_KEY.getKey()));
        vo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                         PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));

        checkAuthorization(userHasPrivilege(request.getSession(), vo));
       
        //get data from the form
View Full Code Here

    // ==================================================================================================


    private void setProjectIdeasMenuPrivileges(SideMenuVo menuPrivVo, AuthenticatedUserVo userVo) {
        UserPrivilegeVo userPrivVo = new UserPrivilegeVo();

        userPrivVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                    UserPrivilegeType.Key.MANAGE_PROJECT_IDEAS_KEY.getKey()));
        userPrivVo.setActionType(getReadWriteAction());

        menuPrivVo.setCreateProjectIdeaVisible(userVo.hasPrivilege(userPrivVo));
    }
View Full Code Here

TOP

Related Classes of org.sete.vo.common.UserPrivilegeVo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.