mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 18:44:22 +00:00
[DS-270] Make delegate admin permissions configurable
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4309 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -141,4 +141,50 @@ public abstract class DSpaceObject
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the dspace object where an ADMIN action right is sufficient to
|
||||
* grant the initial authorize check.
|
||||
* <p>
|
||||
* Default behaviour is ADMIN right on the object grant right on all other
|
||||
* action on the object itself. Subclass should override this method as
|
||||
* need.
|
||||
*
|
||||
* @param action
|
||||
* ID of action being attempted, from
|
||||
* <code>org.dspace.core.Constants</code>. The ADMIN action is
|
||||
* not a valid parameter for this method, an
|
||||
* IllegalArgumentException should be thrown
|
||||
* @return the dspace object, if any, where an ADMIN action is sufficient to
|
||||
* grant the original action
|
||||
* @throws SQLException
|
||||
* @throws IllegalArgumentException
|
||||
* if the ADMIN action is supplied as parameter of the method
|
||||
* call
|
||||
*/
|
||||
public DSpaceObject getAdminObject(int action) throws SQLException
|
||||
{
|
||||
if (action == Constants.ADMIN)
|
||||
{
|
||||
throw new IllegalArgumentException("Illegal call to the DSpaceObject.getAdminObject method");
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the dspace object that "own" the current object in the hierarchy.
|
||||
* Note that this method has a meaning slightly different from the
|
||||
* getAdminObject because it is independent of the action but it is in a way
|
||||
* related to it. It defines the "first" dspace object <b>OTHER</b> then the
|
||||
* current one, where allowed ADMIN actions imply allowed ADMIN actions on
|
||||
* the object self.
|
||||
*
|
||||
* @return the dspace object that "own" the current object in
|
||||
* the hierarchy
|
||||
* @throws SQLException
|
||||
*/
|
||||
public DSpaceObject getParentObject() throws SQLException
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user