public class AuthorizeUtil extends Object
| Constructor and Description |
|---|
AuthorizeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
authorizeManageAdminGroup(Context context,
Collection collection)
Can the current user create/edit the admins group of the collection?
please note that the remove action need a separate check
|
static void |
authorizeManageAdminGroup(Context context,
Community community)
Can the current user create/edit the admins group of the community?
please note that the remove action need a separate check
|
static void |
authorizeManageBitstreamPolicy(Context context,
Bitstream bitstream)
Is allowed manage (create, remove, edit) bitstream's policies in the
current context?
|
static void |
authorizeManageBundlePolicy(Context context,
Bundle bundle)
Is allowed manage (create, remove, edit) bundle's policies in the
current context?
|
static void |
authorizeManageCCLicense(Context context,
Item item)
Is the current user allowed to manage (add, remove, replace) the item's
CC License
|
static void |
authorizeManageCollectionPolicy(Context context,
Collection collection)
Is allowed manage (create, remove, edit) collection's policies in the
current context?
|
static void |
authorizeManageCommunityPolicy(Context context,
Community community)
Is allowed manage (create, remove, edit) community's policies in the
current context?
|
static void |
authorizeManageItemPolicy(Context context,
Item item)
Is allowed manage (create, remove, edit) item's policies in the
current context?
|
static void |
authorizeManagePolicy(Context c,
ResourcePolicy rp)
Can the current user remove or edit the supplied policy?
|
static void |
authorizeManageSubmittersGroup(Context context,
Collection collection)
Can the current user manage (create, remove, edit) the submitters group of
the collection?
|
static void |
authorizeManageTemplateItem(Context context,
Collection collection)
Is the current user allowed to manage (create, remove, edit) the
collection's template item?
|
static void |
authorizeManageWorkflowsGroup(Context context,
Collection collection)
Can the current user manage (create, remove, edit) the workflow groups of
the collection?
|
static void |
authorizeReinstateItem(Context context,
Item item)
Can the current user reinstate the item?
|
static void |
authorizeRemoveAdminGroup(Context context,
Collection collection)
Can the current user remove the admins group of the collection?
please note that the create/edit actions need separate check
|
static void |
authorizeRemoveAdminGroup(Context context,
Community community)
Can the current user remove the admins group of the community?
please note that the create/edit actions need separate check
|
static void |
authorizeWithdrawItem(Context context,
Item item)
Can the current user withdraw the item?
|
static void |
requireAdminRole(Context context)
Throw an AuthorizeException if the current user is not a System Admin
|
public static void authorizeManageBitstreamPolicy(Context context, Bitstream bitstream) throws AuthorizeException, SQLException
context - the DSpace Context Objectbitstream - the bitstream that the policy refer toAuthorizeException - if the current context (current user) is not allowed to
manage the bitstream's policiesSQLException - if a db error occurpublic static void authorizeManageBundlePolicy(Context context, Bundle bundle) throws AuthorizeException, SQLException
context - the DSpace Context Objectbundle - the bundle that the policy refer toAuthorizeException - if the current context (current user) is not allowed to
manage the bundle's policiesSQLException - if a db error occurpublic static void authorizeManageItemPolicy(Context context, Item item) throws AuthorizeException, SQLException
context - the DSpace Context Objectitem - the item that the policy refer toAuthorizeException - if the current context (current user) is not allowed to
manage the item's policiesSQLException - if a db error occurpublic static void authorizeManageCollectionPolicy(Context context, Collection collection) throws AuthorizeException, SQLException
context - the DSpace Context Objectcollection - the collection that the policy refer toAuthorizeException - if the current context (current user) is not allowed to
manage the collection's policiesSQLException - if a db error occurpublic static void authorizeManageCommunityPolicy(Context context, Community community) throws AuthorizeException, SQLException
context - the DSpace Context Objectcommunity - the community that the policy refer toAuthorizeException - if the current context (current user) is not allowed to
manage the community's policiesSQLException - if a db error occurpublic static void requireAdminRole(Context context) throws AuthorizeException, SQLException
context - the DSpace Context ObjectAuthorizeException - if the current user is not a System AdminSQLException - if a db error occurpublic static void authorizeManageCCLicense(Context context, Item item) throws AuthorizeException, SQLException
context - the DSpace Context Objectitem - the item that the CC License refer toAuthorizeException - if the current user is not allowed to
manage the item's CC LicenseSQLException - if a db error occurpublic static void authorizeManageTemplateItem(Context context, Collection collection) throws AuthorizeException, SQLException
context - the DSpace Context Objectcollection - the collectionAuthorizeException - if the current user is not allowed to manage the collection's
template itemSQLException - if a db error occurpublic static void authorizeManageSubmittersGroup(Context context, Collection collection) throws AuthorizeException, SQLException
context - the DSpace Context Objectcollection - the collectionAuthorizeException - if the current user is not allowed to manage the collection's
submitters groupSQLException - if a db error occurpublic static void authorizeManageWorkflowsGroup(Context context, Collection collection) throws AuthorizeException, SQLException
context - the DSpace Context Objectcollection - the collectionAuthorizeException - if the current user is not allowed to manage the collection's
workflow groupsSQLException - if a db error occurpublic static void authorizeManageAdminGroup(Context context, Collection collection) throws AuthorizeException, SQLException
context - the DSpace Context Objectcollection - the collectionAuthorizeException - if the current user is not allowed to create/edit the
collection's admins groupSQLException - if a db error occurauthorizeRemoveAdminGroup(Context, Collection)public static void authorizeRemoveAdminGroup(Context context, Collection collection) throws AuthorizeException, SQLException
context - the DSpace Context Objectcollection - the collectionAuthorizeException - if the current user is not allowed to remove the
collection's admins groupSQLException - if a db error occurauthorizeManageAdminGroup(Context, Collection)public static void authorizeManageAdminGroup(Context context, Community community) throws AuthorizeException, SQLException
context - the DSpace Context Objectcommunity - the communityAuthorizeException - if the current user is not allowed to create/edit the
community's admins groupSQLException - if a db error occurauthorizeRemoveAdminGroup(Context, Collection)public static void authorizeRemoveAdminGroup(Context context, Community community) throws SQLException, AuthorizeException
context - the DSpace Context Objectcommunity - the communityAuthorizeException - if the current user is not allowed to remove the
collection's admins groupSQLException - if a db error occurauthorizeManageAdminGroup(Context, Community)public static void authorizeManagePolicy(Context c, ResourcePolicy rp) throws SQLException, AuthorizeException
c - the DSpace Context Objectrp - a resource policyAuthorizeException - if the current context (current user) is not allowed to
remove/edit the policySQLException - if a db error occurpublic static void authorizeWithdrawItem(Context context, Item item) throws SQLException, AuthorizeException
context - the DSpace Context Objectitem - the itemSQLException - if a db error occurAuthorizeException - if the current user is not allowed to perform the item
withdrawpublic static void authorizeReinstateItem(Context context, Item item) throws SQLException, AuthorizeException
context - the DSpace Context Objectitem - the itemSQLException - if a db error occurAuthorizeException - if the current user is not allowed to perform the item
reinstatementCopyright © 2015 DuraSpace. All Rights Reserved.