assigning page edit permission to non admin user

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
whittlechap
New Member
New Member
Posts: 7
Joined: Sat Sep 13, 2008 9:40 am

assigning page edit permission to non admin user

Post by whittlechap »

ok so this is an edited irc conversation which should illuminate quickly as to what i'm hoping to achieve:


..... how as a non admin - with full permissions - can i assign another user with lower permissions to edit specific pages.  
- i've removed permissions to edit pages from the contributor group .............
- I've even removed edit all content type permissions for tthose lower groups to see if that helped release the option, but it doesn't
- it  only seems to work if you are logged in with the admin account, regardless if you've given another account all the permissions of admin.

So, I have these user groups: contributors - they should only be able to edit particular pages on the site. Site managers who have all but clear admin log permissions - they should be able to do the assigning.... the problem is how to get the site managers - or those in that group to be able to assign these editing rights to the other users.

admin/editcontent_extra.php lines 59 - 72 arecommented out any one know if that is it?
these are the lines:

Code: Select all

//	#Fill Additional Editors (kind of kludgy)
//	if (isset($params["additional_editors"]))
//	{
//		$addtarray = array();
//		foreach ($params["additional_editors"] as $addt_user_id)
//		{
//			$addtarray[] = $addt_user_id;
// 		}
// 		$contentobj->SetAdditionalEditors($addtarray);
// 	}
// 	else if ($adminaccess)
//	{
//		$contentobj->SetAdditionalEditors(array());
// 	}
}
can this line be changed,

Code: Select all

else if ($adminaccess)
is this what restricts it to the admin user?
[/color]
any help gratefully received, thanks
p.s. i'm aware this might be in the wrong discussion group, but it seemed to be a specific php question so it seemed to fit here best.
Last edited by whittlechap on Thu Dec 17, 2009 12:22 am, edited 1 time in total.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: assigning page edit permission to non admin user

Post by jmcgin51 »

I'm not exactly certain what you're asking, but to allow a "restricted access"  (i.e. not full admin) user access to edit specific pages, you just need to select them as Additional Editors on the Options tab in the page editor.
whittlechap
New Member
New Member
Posts: 7
Joined: Sat Sep 13, 2008 9:40 am

Re: assigning page edit permission to non admin user

Post by whittlechap »

Thanks for the reply, the thing is that i can only see those particular options when logged in as admin, i cant when logged in as anyone else. -since this my install has gone nuts any way - i'm getting this error:

| removed text from here  that had nothing to do with this problem. |
Last edited by whittlechap on Thu Dec 17, 2009 2:38 pm, edited 1 time in total.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: assigning page edit permission to non admin user

Post by jmcgin51 »

so you want a non-admin to be able to GIVE editing rights to another user?  is that right?

So you have User A, a full admin.

He creates User B, with something less than full admin privileges, and User C, with privileges <= User B.

You now want User B to give User C page-editing privileges.

Right?
whittlechap
New Member
New Member
Posts: 7
Joined: Sat Sep 13, 2008 9:40 am

Re: assigning page edit permission to non admin user

Post by whittlechap »

so you want a non-admin to be able to GIVE editing rights to another user?  is that right?
yes

So you have User A, a full admin.
yes
He creates User B, with something less than full admin privileges, and User C, with privileges <= User B.
yes, but User C has minimal privilages only so that User C can edit a few pages and that would be it. S o always < than User B
You now want User B to give User C page-editing privileges.
Yes, exactly

Because the site is managed by a team of people they can have lots of permissions, like for example creating a user whose only task is to edit pages and add content (i'm calling them contributors). But it needs more than one user to do it and that would mean sharing the admin account - i really want to avoid that.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: assigning page edit permission to non admin user

Post by Dr.CSS »

You can make groups with certain permissions only...
whittlechap
New Member
New Member
Posts: 7
Joined: Sat Sep 13, 2008 9:40 am

Re: assigning page edit permission to non admin user

Post by whittlechap »

Sorry I don't understand this. What do you mean? -  You're saying nothing can be done? What about the code above - is that relevant? I hoped that there might be a section on that edit page that checked if the user is an admin user and so allowed that user to change or not change the edit permissions for that page. am i well off the mark?
thanks
Last edited by whittlechap on Thu Dec 17, 2009 10:00 pm, edited 1 time in total.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: assigning page edit permission to non admin user

Post by jmcgin51 »

Just did some testing with the scenario I presented above, and I do not see a way to do what you want to do.  Not saying it can't be done, but I haven't found the way yet.

Since the code you pasted is commented out, it cannot be affecting the current behavior of the software.  I do not know exactly what would happen if you were to uncomment it.  Nothing to be hurt by a little trial and error...

Not to hijack this thread, but this discussion and my testing led to another interesting observation:
If I am the full admin user and I go to the list of Pages in the Admin Panel, I can click directly on a page name to edit it.

If I am any lesser user, I must click on the "Edit" icon at the far right side of the page, not on the page name itself.

Anyone know why this is?
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: assigning page edit permission to non admin user

Post by jmcgin51 »

Just had a thought - in the Global Settings, you can specify which properties users WITHOUT the "Modify All Content" permission can see.  One of them is "Additional Editors".

Of course, I only had this thought after I had deleted my test groups/users, so I have not (and will not) be testing this.  But I think it looks promising.

For some reason, even users with "Manage All Content" (except the full admin) cannot assign/remove additional editors.  Doesn't make sense to me, but that appears to be the way it is.

Hopefully one of the dev team can clarify all of this for us.
whittlechap
New Member
New Member
Posts: 7
Joined: Sat Sep 13, 2008 9:40 am

Re: assigning page edit permission to non admin user

Post by whittlechap »

Thanks for your helpful comments jmcgin51.
I did look at global settings, but i'll have another look since you point it out.
I did uncomment the code nothing seemed to change - though i'm not sure what else i should have done... It seems to me that it could be a simple (fairly simple) case of finding the code in the editing.php page that allows a user to see the additional editing section and allowing those users to write to the table that gives the permissions to edit pages.

...... taken a look at global settings, you're right there is an option for this - but that is just wierd isn't it? why can you assign permission for a user to edit additional users when they can't edit the content? something about this permission hierarchy doesn't make sense. and given the options what's the point of the manage all content permission - when you can't edit the additional editors yourself... i'm becoming thoroughly confused by this, help much appreciated. ??? 
Last edited by whittlechap on Sat Dec 19, 2009 7:25 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: assigning page edit permission to non admin user

Post by RonnyK »

jmcgin51,

concerning your questions related to the permission model. Currently ONLY the owner of a page can assign add.editors. So people with permission can edit pages, but not assign other users to it.

And because of some hard logic with the "modify any page", it is not possible to link the page with that permission, due too some interfering logic....

Ronny
Last edited by RonnyK on Sat Dec 19, 2009 7:47 pm, edited 1 time in total.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: assigning page edit permission to non admin user

Post by jmcgin51 »

Thanks, Ronny!!

Hopefully in the future, the permission scheme will be revised to allow an "Manage Page Editors" permission.
whittlechap
New Member
New Member
Posts: 7
Joined: Sat Sep 13, 2008 9:40 am

Re: assigning page edit permission to non admin user

Post by whittlechap »

Yes thanks for the help.
- i'd like to see that feature too, it'd make the cms more flexible for company / organisation deployments and intranets, especially if you could manage the hierarchy of it so that groups can assign such permissions only with in certain site sections.
Post Reply

Return to “CMSMS Core”