Package ome.security
Interface SecurityFilter
-
- All Known Implementing Classes:
AbstractSecurityFilter
,AllGroupsSecurityFilter
,LightAdminPrivilegesSecurityFilter
,OneGroupSecurityFilter
,SecurityFilterHolder
,SharingSecurityFilter
public interface SecurityFilter
Base filter interface ...- Since:
- 4.4
- See Also:
- ticket117, ticket1154, ticket3529
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
current_user
static java.lang.String
is_adminorpi
static java.lang.String
is_nonprivate
static java.lang.String
is_share
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
disable(org.hibernate.Session sess)
Reverts the call toenable(Session, EventContext)
.void
enable(org.hibernate.Session sess, ome.system.EventContext ec)
Enables this filter with the settings from this filter.java.lang.String
getDefaultCondition()
Return the string to be used as the condition.java.lang.String
getName()
Name of this security filter.java.util.Map<java.lang.String,java.lang.String>
getParameterTypes()
Return a mapping of the hibernate types for each of the parameters that the condition takes.boolean
passesFilter(org.hibernate.Session session, ome.model.internal.Details d, ome.system.EventContext c)
tests that theDetails
argument passes the security test that this filter defines.
-
-
-
Field Detail
-
is_share
static final java.lang.String is_share
- See Also:
- Constant Field Values
-
is_adminorpi
static final java.lang.String is_adminorpi
- See Also:
- Constant Field Values
-
is_nonprivate
static final java.lang.String is_nonprivate
- See Also:
- Constant Field Values
-
current_user
static final java.lang.String current_user
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
java.lang.String getName()
Name of this security filter. By default this will likely return the simple class name for the instance. This value will be used to activate the filter on the Hibernate session.
-
getParameterTypes
java.util.Map<java.lang.String,java.lang.String> getParameterTypes()
Return a mapping of the hibernate types for each of the parameters that the condition takes.
-
getDefaultCondition
java.lang.String getDefaultCondition()
Return the string to be used as the condition.
-
passesFilter
boolean passesFilter(org.hibernate.Session session, ome.model.internal.Details d, ome.system.EventContext c)
tests that theDetails
argument passes the security test that this filter defines. The two must be kept in sync. This will be used mostly by theOmeroInterceptor.onLoad(Object, java.io.Serializable, Object[], String[], org.hibernate.type.Type[])
method.- Parameters:
d
- Details instance. If null (or if itsPermissions
are null allrights
will be assumed.- Returns:
- true if the object to which this
-
enable
void enable(org.hibernate.Session sess, ome.system.EventContext ec)
Enables this filter with the settings from this filter. The intent is that after this call, no Hibernate queries will return any objects that would fail a call topassesFilter(Session, Details, EventContext)
.- Parameters:
sess
- Non-null.ec
- Non-null.
-
disable
void disable(org.hibernate.Session sess)
Reverts the call toenable(Session, EventContext)
.
-
-