Package ome.security.policy
Class BinaryAccessPolicy
- java.lang.Object
-
- ome.security.policy.BasePolicy
-
- ome.security.policy.BinaryAccessPolicy
-
- All Implemented Interfaces:
Policy
public class BinaryAccessPolicy extends BasePolicy
Policy which should be checked anytime access to original binary files in OMERO is being attempted. This check is in addition to the standard permission permission and is intended to allow customizing who has access to widely shared data.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMEThis string can also be found in the Constants.ice file in the blitz package.-
Fields inherited from class ome.security.policy.BasePolicy
types
-
-
Constructor Summary
Constructors Constructor Description BinaryAccessPolicy(java.util.Set<java.lang.Class<ome.model.IObject>> types, ACLVoter voter)BinaryAccessPolicy(java.util.Set<java.lang.Class<ome.model.IObject>> types, ACLVoter voter, java.lang.String[] config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckRestriction(ome.model.IObject obj)LikePolicy.isRestricted(IObject)but throws an appropriateSecurityViolationsubclass if the restriction is active.java.lang.StringgetName()Unique name for a class of restrictions that thisPolicywill enforce.protected java.util.Set<java.lang.String>groupRestrictions(ome.model.IObject obj)booleanisRestricted(ome.model.IObject obj)Checks whether or not this instance would throw aSecurityViolationif the same instance were passed toPolicy.checkRestriction(IObject).-
Methods inherited from class ome.security.policy.BasePolicy
getTypes
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
This string can also be found in the Constants.ice file in the blitz package.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:PolicyUnique name for a class of restrictions that thisPolicywill enforce. This string will be sent to clients viaPermissions.copyExtendedRestrictions()in order to prevent exceptions, and server-code will pass the same name to the check method to potentially have an exception thrown.- Specified by:
getNamein interfacePolicy- Specified by:
getNamein classBasePolicy
-
isRestricted
public boolean isRestricted(ome.model.IObject obj)
Description copied from interface:PolicyChecks whether or not this instance would throw aSecurityViolationif the same instance were passed toPolicy.checkRestriction(IObject). This is likely determined by first testing the type of theIObjectand then that the current user context has access to the given context.- Specified by:
isRestrictedin interfacePolicy- Overrides:
isRestrictedin classBasePolicy- Parameters:
obj- a non-nullIObjectinstance.- Returns:
- true if this
Policydecides that a restriction should be placed on the passed context.
-
groupRestrictions
protected java.util.Set<java.lang.String> groupRestrictions(ome.model.IObject obj)
-
checkRestriction
public void checkRestriction(ome.model.IObject obj)
Description copied from interface:PolicyLikePolicy.isRestricted(IObject)but throws an appropriateSecurityViolationsubclass if the restriction is active.- Specified by:
checkRestrictionin interfacePolicy- Overrides:
checkRestrictionin classBasePolicy
-
-