Package ome.security.basic
Class GroupChmodStrategy
- java.lang.Object
-
- ome.security.basic.GroupChmodStrategy
-
- All Implemented Interfaces:
ChmodStrategy,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class GroupChmodStrategy extends java.lang.Object implements ChmodStrategy, org.springframework.context.ApplicationContextAware
ChmodStrategywhich only permits modifying the permissions on groups.- Since:
- 4.4
-
-
Constructor Summary
Constructors Constructor Description GroupChmodStrategy(BasicACLVoter voter, SessionFactory osf, ome.util.SqlAction sql, ExtendedMetadata em)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheck(ome.model.IObject obj, java.lang.Object check)Here we used the checks returned fromExtendedMetadatato iterate through every non-system table and check that it has no FKs which point to back to its rows and violate the read permissions which are being reduced.voidchmod(ome.model.IObject obj, java.lang.String permissions)Change the permissions for the given object.java.lang.Object[]getChecks(ome.model.IObject obj, java.lang.String permissions)Return all the checks necessary to validate the given object if it were to have its permissions.voidsetApplicationContext(org.springframework.context.ApplicationContext ctx)
-
-
-
Constructor Detail
-
GroupChmodStrategy
public GroupChmodStrategy(BasicACLVoter voter, SessionFactory osf, ome.util.SqlAction sql, ExtendedMetadata em)
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext ctx) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getChecks
public java.lang.Object[] getChecks(ome.model.IObject obj, java.lang.String permissions)Description copied from interface:ChmodStrategyReturn all the checks necessary to validate the given object if it were to have its permissions. The Object return value should be assumed opaque, and is primarily intended for passing it back toChmodStrategy.check(IObject, Object).- Specified by:
getChecksin interfaceChmodStrategy
-
chmod
public void chmod(ome.model.IObject obj, java.lang.String permissions)Description copied from interface:ChmodStrategyChange the permissions for the given object. This may do nothing if the permissions do not differ from the current settings. In any case, this method is intended to return quickly. Once the change takes place, it will be necessary to runChmodStrategy.check(IObject, Object)to guarantee that no invalid links are present.- Specified by:
chmodin interfaceChmodStrategy
-
check
public void check(ome.model.IObject obj, java.lang.Object check)Here we used the checks returned fromExtendedMetadatato iterate through every non-system table and check that it has no FKs which point to back to its rows and violate the read permissions which are being reduced.- Specified by:
checkin interfaceChmodStrategy
-
-