public abstract class AbstractSecurityFilter extends org.springframework.orm.hibernate3.FilterDefinitionFactoryBean implements SecurityFilter
FilterDefinitionFactoryBean
in order to construct our
security filter in code and not in XML. This allows us to make use of the
knowledge within Permissions
With the addition of shares in 4.0, it is necessary to remove the security
filter if a share is active and allow loading to throw the necessary
exceptions.Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
protected ome.system.Roles |
roles |
current_user, is_adminorpi, is_nonprivate, is_share
Constructor and Description |
---|
AbstractSecurityFilter()
Default constructor which calls all the necessary setters for this
FactoryBean . |
AbstractSecurityFilter(ome.system.Roles roles) |
Modifier and Type | Method and Description |
---|---|
void |
disable(org.hibernate.Session sess)
Reverts the call to
SecurityFilter.enable(Session, EventContext) . |
protected void |
disableBaseFilters(org.hibernate.Session sess) |
protected void |
enableBaseFilters(org.hibernate.Session sess,
int admin01,
java.lang.Long currentUserId) |
java.lang.String |
getName()
Name of this security filter.
|
boolean |
isAdminOrPi(ome.system.EventContext c) |
boolean |
isNonPrivate(ome.system.EventContext c) |
boolean |
isShare(ome.system.EventContext c) |
afterPropertiesSet, getObject, getObjectType, isSingleton, setBeanName, setDefaultFilterCondition, setFilterName, setParameterTypes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enable, getDefaultCondition, getParameterTypes, passesFilter
public AbstractSecurityFilter()
FactoryBean
. Also calls FilterDefinitionFactoryBean.setDefaultFilterCondition(String)
.
This query clause must be kept in sync with
SecurityFilter.passesFilter(Session, Details, EventContext)
.SecurityFilter.passesFilter(Session, Details, EventContext)
,
FilterDefinitionFactoryBean.setFilterName(String)
,
FilterDefinitionFactoryBean.setParameterTypes(java.util.Map)
,
FilterDefinitionFactoryBean.setDefaultFilterCondition(String)
public AbstractSecurityFilter(ome.system.Roles roles)
public java.lang.String getName()
SecurityFilter
getName
in interface SecurityFilter
public void disable(org.hibernate.Session sess)
SecurityFilter
SecurityFilter.enable(Session, EventContext)
.disable
in interface SecurityFilter
public boolean isNonPrivate(ome.system.EventContext c)
public boolean isAdminOrPi(ome.system.EventContext c)
public boolean isShare(ome.system.EventContext c)
protected void enableBaseFilters(org.hibernate.Session sess, int admin01, java.lang.Long currentUserId)
protected void disableBaseFilters(org.hibernate.Session sess)