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
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.
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...
It cant be so complicated.. nobody knows???
-
MODX Staff
- 10,725 Posts
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.
-
☆ A M B ☆
- 427 Posts
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: