public class SecurityFilterHolder extends java.lang.Object implements SecurityFilter
SecurityFilter
instance and allowing dispatching between them.SecurityFilter| Modifier and Type | Field and Description |
|---|---|
protected AllGroupsSecurityFilter |
allgroups |
protected CurrentDetails |
cd |
protected java.lang.ThreadLocal<SecurityFilter> |
current |
protected OneGroupSecurityFilter |
onegroup |
protected SharingSecurityFilter |
share |
current_user, is_adminorpi, is_nonprivate, is_share| Constructor and Description |
|---|
SecurityFilterHolder(CurrentDetails cd,
OneGroupSecurityFilter onegroup,
AllGroupsSecurityFilter allgroups,
SharingSecurityFilter share) |
| Modifier and Type | Method and Description |
|---|---|
SecurityFilter |
choose() |
void |
disable(org.hibernate.Session sess)
Reverts the call to
SecurityFilter.enable(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 s,
ome.model.internal.Details d,
ome.system.EventContext c)
tests that the
Details argument passes the security test that
this filter defines. |
protected final AllGroupsSecurityFilter allgroups
protected final OneGroupSecurityFilter onegroup
protected final SharingSecurityFilter share
protected final CurrentDetails cd
protected java.lang.ThreadLocal<SecurityFilter> current
public SecurityFilterHolder(CurrentDetails cd, OneGroupSecurityFilter onegroup, AllGroupsSecurityFilter allgroups, SharingSecurityFilter share)
public SecurityFilter choose()
public java.lang.String getName()
SecurityFiltergetName in interface SecurityFilterpublic java.lang.String getDefaultCondition()
SecurityFiltergetDefaultCondition in interface SecurityFilterpublic java.util.Map<java.lang.String,java.lang.String> getParameterTypes()
SecurityFiltergetParameterTypes in interface SecurityFilterpublic void enable(org.hibernate.Session sess,
ome.system.EventContext ec)
SecurityFilterSecurityFilter.passesFilter(Session, Details, EventContext).enable in interface SecurityFiltersess - Non-null.ec - Non-null.public void disable(org.hibernate.Session sess)
SecurityFilterSecurityFilter.enable(Session, EventContext).disable in interface SecurityFilterpublic boolean passesFilter(org.hibernate.Session s,
ome.model.internal.Details d,
ome.system.EventContext c)
SecurityFilterDetails argument passes the security test that
this filter defines. The two must be kept in sync. This will be used
mostly by the
OmeroInterceptor.onLoad(Object, java.io.Serializable, Object[], String[], org.hibernate.type.Type[])
method.passesFilter in interface SecurityFilterd - Details instance. If null (or if its Permissions are
null all rights will be assumed.