Package org.dspace.authorize

Examples of org.dspace.authorize.AuthorizeException


                resp.sendError(HttpServletResponse.SC_NOT_FOUND);
            }
        }
        catch (SQLException e1)
        {
            new AuthorizeException(e1.getMessage());
        }

        String rpName = rp.getFullName();

        String connection = req.getParameter("connection");
View Full Code Here


  @Override
  protected Object formBackingObject(HttpServletRequest request)
      throws Exception {
    Context context = UIUtil.obtainContext(request);
    if (!AuthorizeManager.isAdmin(context)) {
      throw new AuthorizeException(
          "Only system administrator can access to the export functionality");
    }
    return super.formBackingObject(request);
  }
View Full Code Here

                JSPManager
                        .showAuthorizeError(
                                request,
                                response,
                                new AuthorizeException(
                                        "Only system administrator can access to disabled researcher page"));
            }
            return null;
        }
View Full Code Here

    @Override
    protected void sendRedirect(HttpServletRequest request,
            HttpServletResponse response, Exception ex, String objectId)
            throws IOException, ServletException
    {
        JSPManager.showAuthorizeError(request, response, new AuthorizeException(ex.getMessage()));
        //response.sendRedirect("/cris/ou/details?id=" + objectId);
    }
View Full Code Here

        EditTabResearcherPage editT = getApplicationService().get(
                EditTabResearcherPage.class,
                anagraficaObjectDTO.getTabId());
        if (!tabs.contains(editT))
        {
            throw new AuthorizeException(
                    "You not have needed authorization level to display this tab");
        }

        // collection of boxs
        List<BoxResearcherPage> propertyHolders = new LinkedList<BoxResearcherPage>();
View Full Code Here

        catch (AuthorizeException ex) {
            JSPManager
            .showAuthorizeError(
                    request,
                    response,
                    new AuthorizeException(
                            "Only system administrator can access to disabled researcher page"));
        }
        return null;
    }
View Full Code Here

        Context context = UIUtil.obtainContext(request);
        EPerson currentUser = context.getCurrentUser();
        if ((currentUser==null || (researcher.getEpersonID()!=null && currentUser.getID()!=researcher.getEpersonID()))
               && !AuthorizeManager.isAdmin(context))
        {
            throw new AuthorizeException(
                    "Only system admin can edit not personal researcher page");
        }

        if (AuthorizeManager.isAdmin(context))
        {
            isAdmin = true;
        }

        Integer areaId;
        if (paramTabId == null)
        {
            if (paramFuzzyTabId == null)
            {
                List<EditTabResearcherPage> tabs = getApplicationService()
                        .getTabsByVisibility(
                                EditTabResearcherPage.class, isAdmin);
                if (tabs.isEmpty())
                {
                    throw new AuthorizeException("No tabs defined!!");
                }
                areaId = tabs.get(0).getId();
            }
            else
            {
View Full Code Here

                JSPManager
                        .showAuthorizeError(
                                request,
                                response,
                                new AuthorizeException(
                                        "Only system administrator can access to disabled researcher page"));
            }
            return null;
        }
View Full Code Here

    @Override
    protected void sendRedirect(HttpServletRequest request,
            HttpServletResponse response, Exception ex, String objectId)
            throws IOException, ServletException
    {
        JSPManager.showAuthorizeError(request, response, new AuthorizeException(ex.getMessage()));
        //response.sendRedirect("/cris/dyn/details?id=" + objectId);
    }
View Full Code Here

        // check if request tab from view is active (check on collection before)
        EditTabOrganizationUnit editT = getApplicationService().get(
                EditTabOrganizationUnit.class, anagraficaObjectDTO.getTabId());
        if (!tabs.contains(editT))
        {
            throw new AuthorizeException(
                    "You not have needed authorization level to display this tab");
        }

        // collection of boxs
        List<BoxOrganizationUnit> propertyHolders = new LinkedList<BoxOrganizationUnit>();
View Full Code Here

TOP

Related Classes of org.dspace.authorize.AuthorizeException

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.