We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16430
    • 217 Posts
    I have group of users that can create new resources in front end, but newly created pages are unpublished, waiting for admin approval.
    I want these unpublished resources to be visible only to author of the resource. How can I do that?
    Thanks
      • 42562
      • 1,145 Posts
      I think any author can see his/her unpublished articles if logged in the front-end.
      I know the admin can view these articles only when also logged in the front-end, so i suppose this applies to other authors.
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 16430
        • 217 Posts
        My "webusers" has right "Resource" which means by default they can see unpublished resource, but everybody can see every unpublished... no matter who is author, which is wrong...
          • 16430
          • 217 Posts
          It cant be so complicated.. nobody knows???
          • There is no author-specific permissions for viewing unpublished Resources they have authored. These are controlled by User Groups like all permissions in MODX Revolution. You could probably achieve something like this using a custom Plugin however.
            • Easy way? Use getPage and getResources.

              This should only show the current user their submissions.

              Check out getResources for more specifics, but this is working as is.


              [[!getPage?
                 &elementClass=`modSnippet`
                 &element=`getResources`
                 &showUnpublished=`1`
                 &parents=`0`
                 &depth=`5`
                 &limit=`10`
                 &pageVarKey=`page`  
                 &where=`{"published":false, "createdby":[[+modx.user.id]]}`
                 &tpl=`unPublishedSubmissions`
              
              ]]
              <div class="paging">
              <ul class="pageList">
                [[!+page.nav]]
              </ul>
              </div>


              Put what ever you want in the unPublishedSubmissions Chunk:
              [[+pagetitle]]<br>
                Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

                Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com