public interface RightPolicyFilter extends PolicyFilter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
Modifier and Type | Method and Description |
---|---|
boolean |
callCanBeReadBy(PublicationCriteria pubCriteria)
|
boolean |
canBeReadBy(boolean isAuthorized,
Category cat,
Group grp,
boolean checkAncestors)
Called by
Category.canBeReadBy(Group, boolean) . |
boolean |
canBeReadBy(boolean isAuthorized,
Category cat,
Member mbr,
boolean searchInGroups,
boolean checkAncestors)
|
boolean |
canBeReadBy(boolean isAuthorized,
Group grp,
Member mbr)
Called by
Group.canBeReadBy(Member) . |
boolean |
canBeReadBy(boolean isAuthorized,
Publication pub,
Group grp)
Called by
Publication.canBeReadBy(Group) . |
boolean |
canBeReadBy(boolean isAuthorized,
Publication pub,
Member mbr,
boolean searchInGroups)
Called by
Publication.canBeReadBy(Member, boolean) . |
boolean |
canCreateContact(boolean isAuthorized,
Member mbr)
Check if the given member can create a new contact.
|
boolean |
canCreateWorkspace(boolean isAuthorized,
Member mbr,
Workspace model)
Check if this member can create workspace :
- ex nihilo if model is null;
- by copiing model if model is not null.
|
boolean |
canDeleteOther(boolean isAuthorized,
Member mbr,
java.lang.Class clazz,
Workspace ws)
Check if this member can delete-other this clazz in at least one of the given workspace.
|
boolean |
canDeleteOther(boolean isAuthorized,
Member mbr,
Data data)
Check if this member can delete-other this instance.
|
boolean |
canManageCategory(boolean isAuthorized,
Member mbr,
Category cat,
boolean searchInGroups,
boolean searchInParent)
|
boolean |
canPublish(boolean isAuthorized,
Member mbr,
java.lang.Class clazz,
java.util.Set wsSet)
Check if this member can publish this clazz in at least one of the given workspace.
|
boolean |
canUpdateOther(boolean isAuthorized,
Member mbr,
java.lang.Class clazz,
Workspace ws)
Check if this member can update-other this clazz in at least one of the given workspace.
|
boolean |
canUpdateOther(boolean isAuthorized,
Member mbr,
Data data)
Check if this member can update-other this instance.
|
boolean |
canUseCategory(boolean isAuthorized,
Member mbr,
Category cat,
boolean searchInGroups,
boolean searchInParent)
|
boolean |
canWorkOn(boolean isAuthorized,
Publication pub,
Member member)
Called by
Member.canWorkOn(Publication) . |
ControllerStatus |
canWorkOn(ControllerStatus status,
int op,
Member mbr,
Member member)
|
java.lang.Boolean |
checkAccess(Member member,
java.lang.String resource,
java.util.Map<java.lang.String,java.lang.Object> context)
This methods is invoked by the AccessControlManager every time
a resource access right is checked.
|
boolean |
checkAfterUpload(DocUploadInfo info)
Checks if the uploaded file must be accepted or rejected.
|
boolean |
checkBeforeUpload(java.lang.String fieldName,
java.lang.String contentType,
java.lang.String fileName)
Checks if the uploaded file must be accepted or rejected.
|
ControllerStatus |
checkHtml(java.lang.String str,
java.lang.String field)
This method is called to check if the given string does not
contain forbidden HTML code
|
int |
getOrder()
Returns object orders value.
|
java.util.Set<Workspace> |
getWorkspaceSet(java.util.Set<Workspace> workspaceSet,
Member mbr)
Retrieve the workspace set of the specified Member.
|
boolean |
isAdmin(boolean isAdmin,
Member member,
Workspace ws)
Called by
Workspace.isAdmin(Member) . |
boolean |
isWorker(boolean isWorker,
Member member,
Workspace ws)
Called by
Member.isWorker(Workspace) and Member.isWorker() . |
init
static final java.lang.String REVISION
boolean canUpdateOther(boolean isAuthorized, Member mbr, Data data)
Member.canUpdateOther(Data)
isAuthorized
- true if internal JCMS control authorized the member to perform this actionmbr
- the member to checkdata
- the data to checkboolean canDeleteOther(boolean isAuthorized, Member mbr, Data data)
Member.canDeleteOther(Data)
isAuthorized
- true if internal JCMS control authorized the member to perform this actionmbr
- the member to checkdata
- the data to checkboolean callCanBeReadBy(PublicationCriteria pubCriteria)
HibernateUtil.queryPublication(PublicationCriteria)
.
It checks if the method canBeReadBy(boolean, Publication, Member, boolean)
must be called on the results of the query.pubCriteria
- the criteria of the query.canBeReadBy(boolean, Publication, Member, boolean)
must be called.boolean canBeReadBy(boolean isAuthorized, Publication pub, Member mbr, boolean searchInGroups)
Publication.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.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.boolean canBeReadBy(boolean isAuthorized, Publication pub, Group grp)
Publication.canBeReadBy(Group)
. It checks if
a group can read this publication.isAuthorized
- true if internal JCMS control authorized the member to perform this actionpub
- the publication to checkgrp
- the group to checkboolean canBeReadBy(boolean isAuthorized, Group grp, Member mbr)
Group.canBeReadBy(Member)
. It checks if
a member can read this group.isAuthorized
- true if internal JCMS control authorized the member to perform this actiongrp
- the groupmbr
- the memberboolean canWorkOn(boolean isAuthorized, Publication pub, Member member)
Member.canWorkOn(Publication)
. It checks if the
given member can work on the given publication (ie, if it has the
rights and if it is in a state the member can work in).isAuthorized
- true if internal JCMS control authorized the member to perform this actionpub
- the publication to checkmember
- the member to checkControllerStatus canWorkOn(ControllerStatus status, int op, Member mbr, Member member)
Member.checkMember(int, Member, java.util.Map)
. It checks if the
given member can work on the given member.status
- the internal JCMS controller status.op
- the operation (OP_CREATE, OP_UPDATE, OP_DELETE)mbr
- the member to work onmember
- the member to checkboolean isWorker(boolean isWorker, Member member, Workspace ws)
Member.isWorker(Workspace)
and Member.isWorker()
. It checks
if the given Member is a Worker for the site or the given workspaceisWorker
- true if internal JCMS control authorized the member to perform this actionmember
- the member to checkws
- the workspace to check or null if caller is Member.isWorker()
boolean canPublish(boolean isAuthorized, Member mbr, java.lang.Class clazz, java.util.Set wsSet)
Member.canPublish(Class, Set)
isAuthorized
- true if internal JCMS control authorized the member to perform this actionmbr
- the member to checkclazz
- the class to checkwsSet
- the Set ow workspace to work withboolean canUpdateOther(boolean isAuthorized, Member mbr, java.lang.Class clazz, Workspace ws)
Member.canUpdateOther(Class, Workspace)
isAuthorized
- true if internal JCMS control authorized the member to perform this actionmbr
- the member to checkclazz
- the class to checkws
- the Workspace to checkboolean canDeleteOther(boolean isAuthorized, Member mbr, java.lang.Class clazz, Workspace ws)
Member.canDeleteOther(Class, Workspace)
isAuthorized
- true if internal JCMS control authorized the member to perform this actionmbr
- the member to checkclazz
- the class to checkws
- the Workspace to checkboolean canBeReadBy(boolean isAuthorized, Category cat, Member mbr, boolean searchInGroups, boolean checkAncestors)
Category.canBeReadBy(Member, boolean, boolean)
. It checks if
a member can read the given category.isAuthorized
- true if internal JCMS control authorized the member to perform this actioncat
- the category to checkmbr
- the member to checksearchInGroups
- if true check if one of the group this
member belongs to is authorized to read this category.checkAncestors
- if true checks the read rights of the ancestors of this category.boolean canBeReadBy(boolean isAuthorized, Category cat, Group grp, boolean checkAncestors)
Category.canBeReadBy(Group, boolean)
. It checks if
a group can read this category.isAuthorized
- true if internal JCMS control authorized the member to perform this actioncat
- the category to checkgrp
- the group to checkcheckAncestors
- if true checks the read rights of the ancestors of this category.boolean canUseCategory(boolean isAuthorized, Member mbr, Category cat, boolean searchInGroups, boolean searchInParent)
Member.canUseCategory(Category, boolean, boolean)
. It check if a category
can be used by given Member.
Note In current implementation:
isAuthorized
- true if internal JCMS control authorized the member to perform this actionmbr
- the member to checkcat
- the category to checksearchInGroups
- if true check if one of the group thissearchInParent
- if true check in parent categoryboolean canManageCategory(boolean isAuthorized, Member mbr, Category cat, boolean searchInGroups, boolean searchInParent)
Member.canManageCategory(Category, boolean, boolean)
. It check if a category
can be managed by given MemberisAuthorized
- true if internal JCMS control authorized the member to perform this actionmbr
- the member to checkcat
- the category to checksearchInGroups
- if true check if one of the group thissearchInParent
- if true check in parent categoryboolean canCreateWorkspace(boolean isAuthorized, Member mbr, Workspace model)
Member.canCreateWorkspace(Workspace)
isAuthorized
- true if internal JCMS control authorized the member to perform this actionmbr
- the member to checkmodel
- the workspace to duplicate or null if the workspace has to be created ex nihilojava.util.Set<Workspace> getWorkspaceSet(java.util.Set<Workspace> workspaceSet, Member mbr)
This method is called by Member.getWorkspaceSet()
.
You MUST NOT (and cannot) modify the workspaceSet received in parameters, create a
new TreeSet of workspace and return it.
workspaceSet
- the workspace set computed by internal JCMS routinembr
- the member for which the workspace set is computedboolean isAdmin(boolean isAdmin, Member member, Workspace ws)
Workspace.isAdmin(Member)
. It checks
if the given Member is an administrator for the specified workspace.
If you change the default behavior for a Member, you should also implement
get getWorkspaceSet(Set, Member)
(see issue JCMS-2601 for a implementation example).
isAdmin
- true if internal JCMS control found member as admin of workspacemember
- the member to checkws
- the workspace to check, never nullboolean canCreateContact(boolean isAuthorized, Member mbr)
isAuthorized
- true if internal JCMS control authorized the member to perform this actionmbr
- the member to checkboolean checkBeforeUpload(java.lang.String fieldName, java.lang.String contentType, java.lang.String fileName)
fieldName
- the name of the field for the given filecontentType
- the content type of the filefileName
- the name of the fileboolean checkAfterUpload(DocUploadInfo info)
info
- information about the uploaded fileControllerStatus checkHtml(java.lang.String str, java.lang.String field)
str
- the String to be checkedfield
- the name of the field which is checkedJcmsUtil.checkHtml(String,String)
java.lang.Boolean checkAccess(Member member, java.lang.String resource, java.util.Map<java.lang.String,java.lang.Object> context)
member
- the Member for which access right is verifiedresource
- a resource URI using a path representation, eg "admin/dev/store-cleaner"context
- an optionnal context map containing relevant information such as workspace or dataint getOrder()
Copyright © 2001-2010 Jalios SA. All Rights Reserved.