The question is really simple but I can't seem to find an easy answer to it.
How can I prevent a user from locking a page. Is there a simple way through which the option is removed from the different menu's? Can this be achieved through user rights? Other (simple) means? I know I can customise each menu - but I'd rather only do this as a last resort
Solved! Go to Solution.
Views
Replies
Total Likes
This is easy, you need to
1. overlay /libs/wcm/core/content/sites/jcr:content/actions/selection/lockpage
2. create granite:rendercondition child node of /apps/wcm/core/content/sites/jcr:content/actions/selection/lockpage/
3. create privilege(granite/ui/components/foundation/renderconditions/privilege) node under granite:rendercondition
4. add properties to this node refer Privilege — Granite UI 1.0 documentation
5. create a group which has readAccessControl or modifyAccessControl access or other access which you like for that lock button should display
JCR 2.0: 16 Access Control Management (Content Repository for Java Technology API v2.0)
you can do same for unlock node as well.
Views
Replies
Total Likes
A locked page is unlocked only by the user who locked it , or an admin account. So yes the best way would be through user management.
Views
Replies
Total Likes
Hi Ankush, I'm aware of what you're saying, but I'm asking exactly HOW I can prevent it from happening in the first place. You say it can be done through user management. Can you specify exactly how I can prevent a user from locking a page? What roles/rights should the user have to prevent this? This is the core question.
Views
Replies
Total Likes
This is easy, you need to
1. overlay /libs/wcm/core/content/sites/jcr:content/actions/selection/lockpage
2. create granite:rendercondition child node of /apps/wcm/core/content/sites/jcr:content/actions/selection/lockpage/
3. create privilege(granite/ui/components/foundation/renderconditions/privilege) node under granite:rendercondition
4. add properties to this node refer Privilege — Granite UI 1.0 documentation
5. create a group which has readAccessControl or modifyAccessControl access or other access which you like for that lock button should display
JCR 2.0: 16 Access Control Management (Content Repository for Java Technology API v2.0)
you can do same for unlock node as well.
Views
Replies
Total Likes
I was hoping not to have to overlay anything, but it's the best practical answer! Thank you for your effort!
Views
Replies
Total Likes
Techically it's an overlay, but you are actually using a documented way to do it. It's much more stable than overlaying Javascript functions.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies