Hello!

This  is my scenario:
User "PartnerAdmin" creates a container "partner". One field in the container is the "partnerPage", for which we automatically set the ACL. In this partner page the user "PartnerAdmin" should not have rights to WRITE, as this will be maintained by the users of the partner. Now the problem is that the "partner" is not shown in the container list after being added.

This can be also recreated in your demo:

Log on with user steven.
Go to KBase -> Marketing. Click on Add information. Create a new Jahia page, called "Test".

Log on with user root.
Go to KBase -> Marketing. Click on "Test" in the list. In the new page, open the Page Properties and take away the Write Rights for user steven.

Log on with user steven.
Go to KBase -> Marketing. The "Test" page is not displayed in the list, just because user steven has no write rights.


The code, which causes this scenario, is in org.jahia.services.pages.ContentPage in method getPage (EntryLoadRequest, String , JahiaUser):

...
if (!operationMode.equals (ParamBean.NORMAL)
   && !operationMode.equals (ParamBean.COMPARE)) {
   // only return page in edit or preview mode if we have write
   // access to it.
   if (!page.checkWriteAccess (user)) {
       // instead let's try to get the page in ACTIVE mode.
       if (page.checkReadAccess (user)) {
           // let's check if the page has active entries first.

           // NK : EDIT_MODE_PAGE_ACCESS_ISSUE
           // Edit Mode allowed even the user has no write access on page
           /*
           if (!this.hasActiveEntries()) {
               return null;
           }*/

           EntryLoadRequest activeLoadRequest = new EntryLoadRequest (
               EntryLoadRequest.ACTIVE_WORKFLOW_STATE, 0,
               loadRequest.getLocales ());
           if (this.getTitle (activeLoadRequest) == null) {
               return null;
           }
       page =
           new JahiaPage (this, this.getPageTemplate (activeLoadRequest),
               this.getACL (), activeLoadRequest);
       }
   }
...

Why is this check there? Is it still somehow possible to display the entry in the list, although the "PartnerAdmin" will only be able to read the page?

Regards,
Benjamin Papez

Reply via email to