vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Prevent users from editing CMS posts (https://vborg.vbsupport.ru/showthread.php?t=240506)

amaiman 04-15-2010 11:11 AM

Prevent users from editing CMS posts
 
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/proje...?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.


All times are GMT. The time now is 09:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01097 seconds
  • Memory Usage 1,715KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete