Examples of UserPrivilegeVo


Examples of org.sete.vo.common.UserPrivilegeVo

  /**
   * Returns all Judge privileges
   * @return
   */
    private UserPrivilegeVo getJudgePrivileges() {
        UserPrivilegeVo upvo = new UserPrivilegeVo();
    upvo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                            UserPrivilegeType.Key.MANAGE_JUDGE_RESULTS_KEY.getKey()));
    upvo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                         PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));

        return upvo;
    }
View Full Code Here

Examples of org.sete.vo.common.UserPrivilegeVo

{
    /**doesn't do anything other than checking whether the user is authorized to access the page*/
    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_REFERENCE_DATA_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

Examples of org.sete.vo.common.UserPrivilegeVo

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

Examples of org.sete.vo.common.UserPrivilegeVo

    /**show an existing AwardType for editing*/
    public ActionForward viewEditAwardType(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) throws Exception
    {
        UserPrivilegeVo vo = new UserPrivilegeVo();
        vo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                            UserPrivilegeType.Key.MANAGE_REFERENCE_DATA_KEY.getKey()));
        vo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                         PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));
       
        checkAuthorization(userHasPrivilege(request.getSession(), vo));

        //find the object for the key
View Full Code Here

Examples of org.sete.vo.common.UserPrivilegeVo

   
    /**save an edited AwardType*/
    public ActionForward editAwardType(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response) throws Exception
    {
        UserPrivilegeVo vo = new UserPrivilegeVo();
        vo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                            UserPrivilegeType.Key.MANAGE_REFERENCE_DATA_KEY.getKey()));
        vo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                         PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));
       
        checkAuthorization(userHasPrivilege(request.getSession(), vo));
       
        //prepare the vo object
View Full Code Here

Examples of org.sete.vo.common.UserPrivilegeVo

    /**delete an AwardType*/
    public ActionForward deleteAwardType(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) throws Exception
    {
        UserPrivilegeVo vo = new UserPrivilegeVo();
        vo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                            UserPrivilegeType.Key.MANAGE_REFERENCE_DATA_KEY.getKey()));
        vo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                         PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));
       
        checkAuthorization(userHasPrivilege(request.getSession(), vo));
       
        //delete the data
View Full Code Here

Examples of org.sete.vo.common.UserPrivilegeVo

        TypeLoader.initializeSystemTypes(super.getServletContext());
        return mapping.findForward(WebConstants.FORWARD_VIEW);
    }

     private UserPrivilegeVo getPrivileges() {
            UserPrivilegeVo upvo = new UserPrivilegeVo();
            upvo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                  UserPrivilegeType.Key.MANAGE_REFERENCE_DATA_KEY.getKey()));
            upvo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                               PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));

            return upvo;
        }
View Full Code Here

Examples of org.sete.vo.common.UserPrivilegeVo

        return vo;
    }

    private boolean doAuthorization(HttpServletRequest request) {
        AuthenticatedUserVo userVo = getAuthenticatedUser(request);
        UserPrivilegeVo privVo = new UserPrivilegeVo();
        privVo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                                UserPrivilegeType.Key.MANAGE_REFERENCE_DATA_KEY.getKey()));
        privVo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                             PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));


        return userVo.hasPrivilege(privVo);
    }
View Full Code Here

Examples of org.sete.vo.common.UserPrivilegeVo

public class ManageTemplateProjectAction extends ViewTemplateProjectAction
{  
    //============OVERRIDDEN ViewTemplateProjectAction ===============
    protected void checkAuthorization(HttpServletRequest request) throws PermissionException
    {
        UserPrivilegeVo vo = new UserPrivilegeVo();
        vo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                            UserPrivilegeType.Key.MANAGE_REFERENCE_DATA_KEY.getKey()));
        vo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                         PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));
       
        checkAuthorization(userHasPrivilege(request.getSession(), vo));
    }   
View Full Code Here

Examples of org.sete.vo.common.UserPrivilegeVo

    /** Minimal privileges for this action
     * @return
     */
    private UserPrivilegeVo getPrivileges() {
        UserPrivilegeVo vo = new UserPrivilegeVo();
        vo.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
                                            UserPrivilegeType.Key.MANAGE_PROJECT_IDEAS_KEY.getKey()));
        vo.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
                                         PrivilegeActionType.Key.READ_KEY.getKey()));

        return vo;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.