Prevent users from editing Article Categories

Moderators: mandville, PhilD, General Support Moderators

Post Reply
User avatar
sseguin
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Sat Apr 10, 2010 2:24 am
Contact:

Prevent users from editing Article Categories

Post by sseguin » Mon Oct 05, 2015 5:14 pm

Hello,

I am trying to setup the site in a way that allows authorized users to post articles in categories, but at the same time, to prevent the users from editing the categories.

We had one of our users accidentally unpublish one of our main categories, and so a lot of content was not accessible. I quickly after being informed published the categories and the issue was solved. But I am trying to find a solution to prevent this in the future.

I have tried several ACL permissions on the categories but they either don't stop the category from being edited or unpublished (and allow articles to be posted), or the category is protected from edits and unpublishing (but you can't add articles to the category).

Is there a way to do this?
-Set certain user groups to not be able to edit the categories or states.
-Continue to allow articles to be added to these categories.

Thanks
https://www.SlopeEdge.net - Dedicated to getting you up close and personal with skiing, hiking, kayaking and adventure

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 24735
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Prevent users from editing Article Categories

Post by Per Yngve Berg » Mon Oct 05, 2015 7:52 pm

Don't give the user "edit.state".

A publisher must then publish the articles afterwards.

User avatar
sseguin
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Sat Apr 10, 2010 2:24 am
Contact:

Re: Prevent users from editing Article Categories

Post by sseguin » Mon Oct 05, 2015 7:54 pm

I see.

That would be the only option? Unfortunately they need to be able to self publish.
https://www.SlopeEdge.net - Dedicated to getting you up close and personal with skiing, hiking, kayaking and adventure

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35206
Joined: Sat Apr 05, 2008 9:58 pm

Re: Prevent users from editing Article Categories

Post by Webdongle » Mon Oct 05, 2015 8:25 pm

  1. Create a User Group with Registered as Parent and leave the Permissions in Global as 'Inherited' >> 'Not Allowed'
  2. Create a Category that you want users of a Group to post in
    1. Set the Create, Edit own etc. in the Category. The permissions will apply to the Articles in the Category not to Categories as a whole
      (i.e Create would mean users in the Group can create Articles but not Categories)
  3. Create other Categories with the new Category as Parent ... they will inherit Permissions from their Parent(the new Category)
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
sseguin
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Sat Apr 10, 2010 2:24 am
Contact:

Re: Prevent users from editing Article Categories

Post by sseguin » Mon Oct 05, 2015 8:53 pm

Hello, thanks for your reply.

I just tried this and it still doesn't have any effect. I followed your instructions carefully, yet people can still create categories, as well as unpublish existing ones and edit them.

I set Global Permissions for the new group as inherited (which calculated to not allowed)
Then making the category I set the permissions to allowed as needed.

What should the settings for Article manager be set to for permissions? Inherit?
https://www.SlopeEdge.net - Dedicated to getting you up close and personal with skiing, hiking, kayaking and adventure

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35206
Joined: Sat Apr 05, 2008 9:58 pm

Re: Prevent users from editing Article Categories

Post by Webdongle » Mon Oct 05, 2015 8:58 pm

PM me SU login and I can take a quick 1st hand look

Addendum
Either you have users in more than one group and that is confusing the issue or your default Template has overrides that are mixing up the permissions.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

DavetheCat
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Aug 03, 2015 7:37 pm

Re: Prevent users from editing Article Categories

Post by DavetheCat » Sun Oct 11, 2015 6:02 pm

Hi,
I've found the same problem, and wondered what the solution was...

I have set up a group who I want to allow to create and publish Articles in specific Categories. I don't want them to be able to create categories or edit them.

Following the Joomla help guide, I created my group with Public as the parent, (so no permissions to begin with). The only global permissions I have given that group are Admin login and Admin Interface login.

Then, in the specific categories where I want them to be able to add articles, I initially just gave them permissions to 'Create' and to 'Edit Own', but that didn't allow them to 'publish' their articles. So I then added the permission to 'Edit State' but whilst that allows them to publish their own articles (which I do want :) ), it also allows them to publish or un-publish the entire category (which I don't want :( ). Is there a way to set it so that my group can create and publish articles only, and not categories?

Also I notice the group is able to add new categories, and I would rather they couldn't. I can't see where I have given them that permission, and how to take it away?

I'm using Joomla v 3.4.4 Any help appreciated!!!

User avatar
sseguin
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Sat Apr 10, 2010 2:24 am
Contact:

Re: Prevent users from editing Article Categories

Post by sseguin » Sun Oct 11, 2015 6:37 pm

Still wondering too. I'm not able able give out login details so still looking for a solution
https://www.SlopeEdge.net - Dedicated to getting you up close and personal with skiing, hiking, kayaking and adventure

DavetheCat
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Aug 03, 2015 7:37 pm

Re: Prevent users from editing Article Categories

Post by DavetheCat » Sun Oct 11, 2015 7:11 pm

Hi Sseguin,

Since posting earlier I've been having a further play and think I have found a partial solution. (still have to fully test this though!)

In Global Config > Articles > Permissions, I have given permissions to that group for "create", "edit state" and "edit own".

Then in the category permissions, I have set everything for that group to Inherited except for "Edit State" for which I have set to Deny permissions. So from top to bottom, in the Category permissions, it allows 'create' and 'edit own' but none of the others are allowed in that category.

From what I can see this allows the group to create an article in that category, the article is immediately published, but they cannot edit the category itself. This is a leap forward for what I want, I hope this might work for you?

The only thing I haven't worked out is how to prevent the group creating a new category (but that's not so big an issue as the other stuff). I'm VERY new to Joomla so don't take this all as gospel, it's my best try so far.

any further help from anyone appreciated!

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35206
Joined: Sat Apr 05, 2008 9:58 pm

Re: Prevent users from editing Article Categories

Post by Webdongle » Sun Oct 11, 2015 9:25 pm

sseguin wrote:Still wondering too. I'm not able able give out login details so still looking for a solution
OK found the problem

In addition to
  1. Create a User Group with Registered as Parent and leave the Permissions in Global as 'Inherited' >> 'Not Allowed'
  2. Create a Category that you want users of a Group to post in
    1. Set the Create, Edit own etc. in the Category. The permissions will apply to the Articles in the Category not to Categories as a whole
      (i.e Create would mean users in the Group can create Articles but not Categories)
  3. Create other Categories with the new Category as Parent ... they will inherit Permissions from their Parent(the new Category)
In Content >>> Categories >>> Options ... set 'Create' to 'Denied'
(it should not be necessary but it appears to be a bug)

If you want a user in the group to have access to edit the specific categories :
In Content >>> Categories >>> Options ... set 'Access Administration Interface' 'Allowed'
and
In Users >>> viewing/access >> Special ... select the new user group.


Addendum
Have created a tracker http://issues.joomla.org/tracker/joomla-cms/8069
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

DavetheCat
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Aug 03, 2015 7:37 pm

Re: Prevent users from editing Article Categories

Post by DavetheCat » Mon Oct 12, 2015 3:04 pm

Hi Webdongle,
Thanks for your advice.
I've been trying out your suggestion, and am still having trouble I'm afraid. I'd really appreciate your further advice, as I clearly have missed or misunderstood something...

I have followed your instructions 1, 2 and 3.

My first problem is that where you said: 'set the Create, Edit own etc. in the Category. The permissions will apply to the Articles in the Category not to Categories as a whole':
I have found that setting 'Edit State' to Allowed in the Category (even though Edit State is not allowed for that group in Global Permissions) results in the group having permission to edit the state of that category as well as the state of the articles they create within it.
Is it possible to allow the group to "edit state" for the articles they create, without being able to edit the state of the category?

My second problem is, where you said "In Content >>> Categories >>> Options ... set 'Create' to 'Denied'" ... could you just explain please exactly where I should be to change Create to Denied - sorry if this sounds odd but if I go to 'Content > Categories > Options' I am taken straight into the 'Articles: Options" area. So if I set the 'Create' field there to 'Denied', users in that group cannot create new articles. I need them to be able to create new articles in specific Categories, (just not to be able to create or edit categories). So I will have to leave that set to 'Allowed'.

I can't see where I can 'Deny' a group the permission to 'Create' or 'Edit' categories? (I had thought there might be a 'categories' heading in the 'System > Global Configuration' component list, but there isn't.)

I'm beginning to think there is something in the template which is automatically going to 'Articles" options" when I go to Content >>> Categories >>> Options. I then wondered if you meant to set 'Create' to 'Denied' for that group in Global Permissions, but that results in them not being able to create articles. So if you can point me in the right direction please I would be v. grateful.

What I would ideally like is for this group to be able to 'create', 'edit state' and 'edit own' Articles in specified categories and for them not to be able to do anything else.

I am probably missing something obvious. Thank you for your time and patience!

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35206
Joined: Sat Apr 05, 2008 9:58 pm

Re: Prevent users from editing Article Categories

Post by Webdongle » Mon Oct 12, 2015 3:15 pm

DavetheCat wrote:...
Is it possible to allow the group to "edit state" for the articles they create, without being able to edit the state of the category?...
None that I know of(with admin access) however I have submitted a bug report and awaiting clarification as to whether it is a bug or if it is intended.

If the user group has front end access only then they should not be able to edit categories.

You may also find something in http://extensions.joomla.org/category/access-a-security
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

DavetheCat
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Aug 03, 2015 7:37 pm

Re: Prevent users from editing Article Categories

Post by DavetheCat » Mon Oct 12, 2015 3:37 pm

Hi Webdongle,
Sorry I should have clarified - the group is an admin group with backend administrator access.

thanks for anything more you find out.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35206
Joined: Sat Apr 05, 2008 9:58 pm

Re: Prevent users from editing Article Categories

Post by Webdongle » Mon Oct 12, 2015 5:04 pm

DavetheCat wrote:...
Sorry I should have clarified - the group is an admin group with backend administrator access.....
If they can perform the creates/edits from the front end there is no need to give them admin access to edit. If you need users to perform admin tasks then create a separate group for that ... then if you need a user to perform edits from the front end and perform other admin task(s) a user can be placed in both groups.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

DavetheCat
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Aug 03, 2015 7:37 pm

Re: Prevent users from editing Article Categories

Post by DavetheCat » Mon Oct 12, 2015 7:00 pm

Oh!! Do you mean that we can allow specified users (in our case, our charity volunteers) to create articles (including uploading an image to it) all from the front end???? I didn't know that (you can tell I'm new to Joomla) I just assumed anyone putting content into the site would have to have back end admin logins.

We need our volunteers to be able to choose which category to put their articles in out of approximately 60 categories (which are already set up). Also we need their articles to be immediately published, not to have to wait for an administrator to publish it. Also, often their articles need to go into more than one category, so assuming that you can't choose multiple categories for one article to appear in, they will be creating maybe 2 or 3 copies of some articles, to be able to put each into it's respective category (and to then choose the same image for each of the copies). If all those requirements can be done from front end, then that's going to be much easier for us!

I'm doubtful though... having just switched on the "login form" module to log in on front end (which we had previously turned off), it gives an option to create an account. We don't want the general public signing up to input content, so unless we can switch off the "create an account" part of that, we will have to stick to back-end editing.

I will go and read up about front end editing now just in case there is a way for it only to be done by our volunteers and not public, but if you are still online and have a quick yes/no answer for if you think all this is possible via front end, that would be really helpful!

thank you!!!!

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35206
Joined: Sat Apr 05, 2008 9:58 pm

Re: Prevent users from editing Article Categories

Post by Webdongle » Mon Oct 12, 2015 8:15 pm

If a user is in a Group that is in that has edit permissions for the Article displayed (or any Article in a Category list/blog) then they can edit the Article. When logged in they click the gear icon and they see an edit icon as well as print/email icon.

'Edit State' allows the user to publish the Article provided that front end option is enabled in the front end. For the selections in the 'Editing Layout' tab in Article >>> Options to take affect then the user must also have those Permissions.
article options 01.JPG
You don't need to allow Admin Access in Global or 'Access Administration Interface' in Article options

As stated before ... if the Create/Edit etc Permissions are only set in a specific Category(ies) then the Article can only be set to one of the specified Categories.

Articles can not be saved with the same Title alias ... you can have an Article with the Same Title but the Title alias needs to be unique. Rather than make copies you could use http://extensions.joomla.org/extensions ... -component You can create tags and instruct the users to select suitable tags. You can then display lists/blogs of Articles that are in different categories. (Note: that in Components >>> Tags >>> Options the settings for the group are 'Inherited' 'Not allowed'. But there is a bug because it needs to be set 'Denied' to prevent the user from creating new tags)

Addendum
Just tested on with Joomla Staging and the user could not create a new Tag so either my site has a mixup with settings or it is a bug that has been fixed ready for the next release.
You do not have the required permissions to view the files attached to this post.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

sovainfo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8818
Joined: Sat Oct 01, 2011 7:06 pm

Re: Prevent users from editing Article Categories

Post by sovainfo » Mon Oct 12, 2015 8:58 pm

In a default installation it is not allowed to register an account. Someone must have enabled it, or you might run an updated installation. Use Users->Manage->Options to set Allow User Registration to No.
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35206
Joined: Sat Apr 05, 2008 9:58 pm

Re: Prevent users from editing Article Categories

Post by Webdongle » Mon Oct 12, 2015 9:29 pm

DavetheCat wrote:...... having just switched on the "login form" module to log in on front end (which we had previously turned off), it gives an option to create an account. We don't want the general public signing up to input content, so unless we can switch off the "create an account" part of that, we will have to stick to back-end editing.....
The default User group is 'Registered' so (provided you didn't edit the Permissions for the registered group and created a new group with 'Registered' as Parent) new users will not be able to create Articles.

Not displaying the Login form doesn't prevent Registration. There are 2 Registration settings. In Users >>> manage >>> options ...
Allow User Registration 'Yes'
and
Allow User Registration 'No'

If set to yes there are 3 settings for Registering
Self
None
and
Administrator

https://docs.joomla.org/Help34:Componen ... figuration
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

DavetheCat
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Mon Aug 03, 2015 7:37 pm

Re: Prevent users from editing Article Categories

Post by DavetheCat » Fri Oct 23, 2015 6:08 pm

Thanks for all the replies.

I have found what is the best solution for us for now, (until we find out the result of the bug report). This may help someone else with similar needs, and solves the initial question by the OP of this thread, who wanted to, "allow authorized users to post articles in categories, but at the same time, to prevent the users from editing the categories."

Here's what I've done:
In Global configs > articles, I set Edit State = Allowed for this group, (allows them to publish their articles)
In the category where they will create articles, I set Edit State = Denied (so they can't un-publish the category)
In the other categories where they won't create articles, I set Edit State = Denied. (ditto)

This configuration does still means the group could accidentally 'create' a category, but that's no big deal since it won't be linked from any menu. Hope that helps!

Also, wanted to say that our users so far are loving using Joomla!

User avatar
Chacapamac
Joomla! Guru
Joomla! Guru
Posts: 795
Joined: Wed Feb 20, 2008 6:50 am
Location: Canada, Montreal
Contact:

Re: Prevent users from editing Article Categories

Post by Chacapamac » Mon Feb 15, 2016 11:50 pm

I cannot see a way to permit frontend-backend article & content (that need to be assigned to some category) and be sure that users cannot messed-up or see or edit the Content —>Category menu
Can God help us?
Marketing, SEO, Web development - Powered by Joomla!
http://www.grafcomm.ca/

User avatar
sseguin
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Sat Apr 10, 2010 2:24 am
Contact:

Re: Prevent users from editing Article Categories

Post by sseguin » Wed May 25, 2016 4:51 pm

I have tried the below suggestion, and it works in preventing changing the state of the Categories, however it also prevents changing the state of an article, or changing the category of an article, once the article is initially saved.

It's really unfortunate that the ACL for Categories and Articles is closely tied together, and not a little more separated.

As it stands now, the below solution creates more issues than it solves unfortunately.

Any other suggestions? I have also looked into extensions to help accomplish this but none do what is required or offer anything in this area that the ACL of Joomla built-in doesn't already do.
DavetheCat wrote:Thanks for all the replies.

I have found what is the best solution for us for now, (until we find out the result of the bug report). This may help someone else with similar needs, and solves the initial question by the OP of this thread, who wanted to, "allow authorized users to post articles in categories, but at the same time, to prevent the users from editing the categories."

Here's what I've done:
In Global configs > articles, I set Edit State = Allowed for this group, (allows them to publish their articles)
In the category where they will create articles, I set Edit State = Denied (so they can't un-publish the category)
In the other categories where they won't create articles, I set Edit State = Denied. (ditto)

This configuration does still means the group could accidentally 'create' a category, but that's no big deal since it won't be linked from any menu. Hope that helps!

Also, wanted to say that our users so far are loving using Joomla!
https://www.SlopeEdge.net - Dedicated to getting you up close and personal with skiing, hiking, kayaking and adventure

accagi
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu May 17, 2018 9:47 am

Re: Prevent users from editing Article Categories

Post by accagi » Mon Aug 06, 2018 3:16 pm

:( Why can't I post in this thread? Three times I posted my solution of this problem and three times it disappeared after a few minutes!

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 14686
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: Prevent users from editing Article Categories

Post by mandville » Mon Aug 06, 2018 3:42 pm

accagi wrote:
Mon Aug 06, 2018 3:16 pm
:( Why can't I post in this thread? Three times I posted my solution of this problem and three times it disappeared after a few minutes!
possibly because the thread is now three years old and if it still presented a problem would be active.
you are therefore "necroposting" ie, posting useless/unwanted/unneeded/irrelevant information to an ancient topic.
would you post today to a windows 95 problem?
so, please dont.
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

User avatar
sseguin
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Sat Apr 10, 2010 2:24 am
Contact:

Re: Prevent users from editing Article Categories

Post by sseguin » Mon Aug 06, 2018 3:48 pm

It still is an issue and presents a daily problem for me to deal with.

I’m not going to keep bumping it for years on end. Ultimately it is an ACL issue that there isn’t permissions that can be set for Articles and permissions separate for managing Categories as they work together.

If there ever is a solution I’d love to know.

Until then I’ll keep dealing with other admins accidentally editing categories or I publishing categories because they don’t réalise they are on Categories and not Articles in the article manager. Less than ideal but I guess that’s how it is.
https://www.SlopeEdge.net - Dedicated to getting you up close and personal with skiing, hiking, kayaking and adventure

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 14686
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: Prevent users from editing Article Categories

Post by mandville » Mon Aug 06, 2018 3:52 pm

perhaps you could add it to issues.joomla.org, if not already done. as you are the OP and to prevent posts that may breach the forum rules, would you like it locked?
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}


Post Reply

Return to “Access Control List (ACL) in Joomla! 3.x”