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
ChmodStrategy
which 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 void
check(ome.model.IObject obj, java.lang.Object check)
Here we used the checks returned fromExtendedMetadata
to 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.void
chmod(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.void
setApplicationContext(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:
setApplicationContext
in 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:ChmodStrategy
Return 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:
getChecks
in interfaceChmodStrategy
-
chmod
public void chmod(ome.model.IObject obj, java.lang.String permissions)
Description copied from interface:ChmodStrategy
Change 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:
chmod
in interfaceChmodStrategy
-
check
public void check(ome.model.IObject obj, java.lang.Object check)
Here we used the checks returned fromExtendedMetadata
to 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:
check
in interfaceChmodStrategy
-
-