PDA

View Full Version : Prevent users from editing CMS posts


amaiman
04-15-2010, 11:11 AM
In the current version of VB CMS, there is no option to prevent users from editing their own posts (articles) on the CMS. This is being discussed here: http://www.vbulletin.com/forum/project.php?issueid=37461 and will likely be resolved in a future version when they add the CMS permissions that should have been there in the first place.

In the meantime, I'd like to make a hack to the code to prevent non-administrators from editing any CMS posts. Before I go poking around in the code, I wanted to see if anyone here (who is probably more familiar with the code than I am) could give me an idea of where I should look to make this change. I assume I'd just need to add an 'if' statement somewhere to check if a user is an admin before proceeding with the edit request, but I'm not sure where the code that initiates the edit request can be found.

Lynne
04-15-2010, 01:54 PM
How about a condition around the edit button to only show to some usergroups (vbcms_content_article_preview and vbcms_content_article_page)? Or, if do=edit , then give a no permission for some usergroups (hook location "vbcms_article_populate_start"?)? (Or a combo of both.)

Carnage
04-16-2010, 01:04 PM
The problem is, if they can't edit they can't post in the first place. To implement this, you will have to flag the post in the db with some extra fields.

Lynne
04-16-2010, 01:46 PM
Give them the permission to edit so they can post, but remove the edit button and give them a no permission on the edit article page. At least, that is what I was thinking.

rughis
08-08-2013, 02:16 PM
Hi all, does exist a solution to this issue?

Lynne
08-08-2013, 08:20 PM
Yeah, there are now CMS permissions to set up who can post and edit.