Class AbstractSecurityFilter

  • All Implemented Interfaces:
    SecurityFilter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.FactoryBean<org.hibernate.engine.FilterDefinition>, org.springframework.beans.factory.InitializingBean
    Direct Known Subclasses:
    AllGroupsSecurityFilter, LightAdminPrivilegesSecurityFilter, OneGroupSecurityFilter, SharingSecurityFilter

    public abstract class AbstractSecurityFilter
    extends org.springframework.orm.hibernate3.FilterDefinitionFactoryBean
    implements SecurityFilter
    overrides 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.
    • Field Detail

      • log

        protected final org.slf4j.Logger log
      • roles

        protected final ome.system.Roles roles
    • Constructor Detail

      • AbstractSecurityFilter

        public AbstractSecurityFilter​(ome.system.Roles roles)
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: SecurityFilter
        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.
        Specified by:
        getName in interface SecurityFilter
      • isNonPrivate

        public boolean isNonPrivate​(ome.system.EventContext c)
      • isAdminOrPi

        public boolean isAdminOrPi​(ome.system.EventContext c)
      • isShare

        public boolean isShare​(ome.system.EventContext c)
      • enableBaseFilters

        protected void enableBaseFilters​(org.hibernate.Session sess,
                                         int admin01,
                                         java.lang.Long currentUserId)
      • disableBaseFilters

        protected void disableBaseFilters​(org.hibernate.Session sess)