Package org.dspace.authorize

Examples of org.dspace.authorize.AuthorizeException


            AuthorizeManager.authorizeAction(context, parentCommunity,
                    Constants.ADMIN);
        }
        else if (!AuthorizeManager.isAdmin(context))
        {
            throw new AuthorizeException(
                    "Only system admin can remove the admin group of the community");
        }
    }
View Full Code Here


        }

        // authorized
        if (!authorized)
        {
            throw new AuthorizeException(
                    "To withdraw item must be COLLECTION_ADMIN or have REMOVE authorization on owning Collection");
        }
    }
View Full Code Here

            basicHost = host.substring(host.substring(0, lastDot).lastIndexOf("."));
        }

        if (fromPage == null || fromPage.indexOf(basicHost) == -1)
        {
            throw new AuthorizeException();
        }

        // The email address they provided
        String formEmail = request.getParameter("email");
View Full Code Here

            {
                userID = c.getCurrentUser().getID();
            }

            // show an error or throw an authorization exception
            throw new AuthorizeException("EditItemServlet: User " + userID
                    + " not authorized to edit item " + item.getID());
        }
    }
View Full Code Here

        response.getOutputStream().flush();
      } catch (Exception e) {
        throw new ServletException(e);
      }
    } else {
      throw new AuthorizeException(
          "You are not authorized to download this Export Archive.");
    }
  }
View Full Code Here

            AuthorizeException
    {
        // Check authorisation - only administrators can create new formats
        if (!AuthorizeManager.isAdmin(context))
        {
            throw new AuthorizeException(
                    "Only administrators can create bitstream formats");
        }

        // Create a table row
        TableRow row = DatabaseManager.create(context,
View Full Code Here

    public void update() throws SQLException, AuthorizeException
    {
        // Check authorisation - only administrators can change formats
        if (!AuthorizeManager.isAdmin(bfContext))
        {
            throw new AuthorizeException(
                    "Only administrators can modify bitstream formats");
        }

        log.info(LogManager.getHeader(bfContext, "update_bitstream_format",
                "bitstream_format_id=" + getID()));
View Full Code Here

    public void delete() throws SQLException, AuthorizeException
    {
        // Check authorisation - only administrators can delete formats
        if (!AuthorizeManager.isAdmin(bfContext))
        {
            throw new AuthorizeException(
                    "Only administrators can delete bitstream formats");
        }

        // Find "unknown" type
        BitstreamFormat unknown = findUnknown(bfContext);
View Full Code Here

            basicHost = host.substring(host.substring(0, lastDot).lastIndexOf("."));
        }

        if (fromPage == null || fromPage.indexOf(basicHost) == -1)
        {
            throw new AuthorizeException();
        }

        // Obtain information from request
        String handle = request.getParameter("handle");
       
View Full Code Here

        {
            displayStatistics(context, request, response);
        }
        else
        {
            throw new AuthorizeException();
        }
    }
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.