Package com.jalios.jcms.security
Class ParentReadRightPolicyFilter
- java.lang.Object
-
- com.jalios.jcms.policy.AbstractPolicyFilter
-
- com.jalios.jcms.policy.BasicRightPolicyFilter
-
- com.jalios.jcms.security.ParentReadRightPolicyFilter
-
- All Implemented Interfaces:
PluginComponent
,PolicyFilter
,RightPolicyFilter
,java.lang.Comparable
public class ParentReadRightPolicyFilter extends BasicRightPolicyFilter
RightPolicyFilter enforcing read right of a publication with the same right applied on its parent. Read right are only restrictive : if read access is forbidden on publication being checked, the parent read right is not verified and read access is directly refused.- Since:
- jcms-10.0.2 / JCMS-7181
-
-
Field Summary
-
Fields inherited from class com.jalios.jcms.policy.BasicRightPolicyFilter
REVISION
-
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
-
Fields inherited from interface com.jalios.jcms.policy.RightPolicyFilter
CTXT_CATEGORIES
-
-
Constructor Summary
Constructors Constructor Description ParentReadRightPolicyFilter()
Builds a new instance to control read access of ALL Publication types.ParentReadRightPolicyFilter(java.lang.Class<? extends Publication> controlledClazz)
Builds a new instance to control read access for the specified type and subtype.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeReadBy(boolean isAuthorized, Publication pub, Member mbr, boolean searchInGroups)
Called byPublication.canBeReadBy(Member, boolean)
.-
Methods inherited from class com.jalios.jcms.policy.BasicRightPolicyFilter
callCanBeReadBy, callCanBeReadBy, canBeReadBy, canBeReadBy, canBeReadBy, canBeReadBy, canBeReadBy, canBeReadBy, canCreateContact, canCreateWorkspace, canDeleteOther, canDeleteOther, canManageCategory, canPublish, canUpdateOther, canUpdateOther, canUseCategory, canWorkOn, canWorkOn, checkAccess, checkAfterUpload, checkBeforeUpload, checkHtml, getWorkspaceSet, init, isAdmin, isWorker
-
Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrder
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.jalios.jcms.policy.RightPolicyFilter
getOrder
-
-
-
-
Constructor Detail
-
ParentReadRightPolicyFilter
public ParentReadRightPolicyFilter()
Builds a new instance to control read access of ALL Publication types.
-
ParentReadRightPolicyFilter
public ParentReadRightPolicyFilter(java.lang.Class<? extends Publication> controlledClazz)
Builds a new instance to control read access for the specified type and subtype.- Parameters:
controlledClazz
- the type of publication for which control must be performed (e.g FaqEntry.class, GlossaryEntry.class, ...), controlled is performe for all publications if null is specifed
-
-
Method Detail
-
canBeReadBy
public boolean canBeReadBy(boolean isAuthorized, Publication pub, Member mbr, boolean searchInGroups)
Description copied from interface:RightPolicyFilter
Called byPublication.canBeReadBy(Member, boolean)
. It checks if a member can read the given publication. WARNING: HIGHLY SENSIBLE, do not modify without being sure of what you do, can dramatically impact performance and can break existing rights behaviour.- Specified by:
canBeReadBy
in interfaceRightPolicyFilter
- Overrides:
canBeReadBy
in classBasicRightPolicyFilter
- Parameters:
isAuthorized
- true if internal JCMS control authorized the member to perform this actionpub
- the publication to checkmbr
- the member to checksearchInGroups
- if true check if one of the group this member belongs to is authorized to read this publication.- Returns:
- true if the member can read this publication
- See Also:
RightPolicyFilter.canBeReadBy(boolean, Publication, Member, boolean)
-
-