ALLOW USER TO PUBLISH ARTICLES INTO ONLY SPECIFIC DIRECTORY
In this tutorial, we will allow a Joomla-backend-user to publish articles into ONLY A SPECIFIC CATEGORY/IES.
SETUP: we have two users, each will be able to publish articles to only 1-category each
1) CREATE GROUP
- create a group: "sports-group" with group parent as public
- create another group: "politics-group" with group parent as public
2) CREATE USER
- create a user: sportsuser with parent as registered. Assign user to sports-group
- create a user, politicsuser with parent as registered. Assign user to politics-group
See the following screenshot of our users list:
3) ADD GROUPS TO SPECIAL ACCESS LEVEL AND ALLOW BACKEND LOGIN
This was covered in a previous tutorial: Joomla ACL Tutorial: create a user account and allow backend login
At this point, users can login via backend, but cant do anything.
4) CREATE CONTENT CATEGORY:
Create content category "sports category" and under the permissions-tab, set as follows:
- for politics-group: set all actions to denied
- for sports-group: set all actions to allowed
Create content category "politics category", and under the permissions-tab, set as follows
for politics-group: set all actions to allowed
for sports-group: set all actions to denied
5) ALLOW USER ACCOUNTS TO PUBLISH ARTICLES:
This was covered in a previous tutorial: Joomla ACL Tutorial: allow user account to publish articles via Joomla backend
TESTING TIME TESTING TIME TESTING TIME
1) Login(backend) as sportsuser, create an article. you would notice that in the category options, only 1-option "sports-category" is available. Publish an article, then logout.
2) Login as politicsuser, create an article. You would notice that in the category options, only 1-option "politics-category" is available.
- you would also notice that you can see the article created by sportsuser(above), but can't edit it. Create and publish your own article as politicsuser
- after publishing your article, check the article list and you would notice that now that there are two articles, but you can only edit your own article.
1) what if you want a user to be able to publish articles into both sports and politics groups?
- just create the user(group parent = registered) and add it to the two groups. The user will now be able to see articles published by other sports&politics groups members.
2) Users in the same group are able to edit each-other's articles, what do I do?
- if another user(ex: politicsuser2) is created and added to politics-group, this useraccount would be able to edit, enable/disable articles published by previous politics-group member/s account.
This is not a desired option. This is what to do:
Goto Content >> category >> select politics-category >> permissions
- in the politics group on the left-side bar, set Edit and Edit-state to Denied (see screenshot below)
Repeat the above for the sports-group / any other groups you many have.
Login as politicsuser, you are able to see articles published by all politics-group members but can only edit your own(useraccount) article.