View Single Post
  #7  
Old 01-22-2005, 05:07 PM
why-not why-not is offline
 
Join Date: Feb 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

I am working on getting my test server up, waiting for DNS to get updated then I will post some examples! Also someone asked me about how the permissions are set for the draft system! So while I am waiting for DNS stuff, I will try to explain the permissions!

The draft system uses vB permissions (groups and users), but also extends the permissions so that full control can be given for each option!

example

user A can save drafts for new replies, but not new posts, user B has same permission as user A in regards to saving drafts, vB group (2), but user B can also save attachments when making a new reply using the extended permissions that the draft control monitors! The draft control uses a simple Admin Panel that allows you to set permission by vB group or single user!

You can turn the full system off for everyone but vB group (6), but still limit options vB group (6) has. Options are also really refined, so full control for each type of save draft request can be limited!

Here is a complete overview of permissions for saving drafts! These are only for saving a draft, and do not contain the permissions for draft storage limits!

OVERVIEW PERMISSIONS (saving drafts!)

Code:
	// the master switch

	$vboptions['draft_on'] = 0; // turn the draft system off for all user except draft_group 2
	$vboptions['draft_on'] = 1; // turn the draft system on

	// master control (drafts allowed for new posts / new topic)

	$vboptions['draft_new'] = 0; // new post drafts not allowed
	$vboptions['draft_new'] = 1; // new post drafts is allowed


	// master control (drafts allowed for new replies / quick replies)

	$vboptions['draft_reply'] = 0; // new reply / quick reply, drafts not allowed
	$vboptions['draft_reply'] = 1; // new reply drafts allowed, quick reply, drafts not allowed
	$vboptions['draft_reply'] = 2; // quick reply drafts allowed, new reply, drafts not allowed
	$vboptions['draft_reply'] = 3; // new reply drafts allowed, quick reply drafts allowed


	// master control (drafts allowed for new pm / reply to pm)

	$vboptions['draft_pms'] = 0; // new pm / reply pm, drafts not allowed
	$vboptions['draft_pms'] = 1; // new pm drafts allowed, reply pm, drafts not allowed
	$vboptions['draft_pms'] = 2; // reply pm drafts allowed, new pm, drafts not allowed
	$vboptions['draft_pms'] = 3; // new pm drafts allowed, reply pm, drafts allowed


	// master control (save attachments with draft[new topic, new post, reply to post)

	$vboptions['draft_attach'] = 0; // do not save attachments if saving as draft
	$vboptions['draft_attach'] = 1; // new topic/post save attachments allowed, reply to post save attachments not allowed
	$vboptions['draft_attach'] = 2; // reply to post, save attachments allowed, new topic/post save attachments not allowed
	$vboptions['draft_attach'] = 3; // reply to post, save attachments allowed, new topic/post save attachments allowed


	// master control (users groups)

	$vboptions['draft_group'] = 0; // no permission (draft system will be off limits to this qroup)
	$vboptions['draft_group'] = 1; // has permission (draft system is on for this qroup only if the master switch is ON)
	$vboptions['draft_group'] = 2; // has permission (draft system will be on for this qroup, even if the master switch is off!)

	example (1) .... (user: admin)

	2, 1, 3, 3, 3

	value (1) = 2 <- $vboptions['draft_group']
	value (2) = 1 <- $vboptions['draft_new']
	value (3) = 3 <- $vboptions['draft_reply']
	value (4) = 3 <- $vboptions['draft_pms']
	value (5) = 3 <- $vboptions['draft_attach']

	So user: admin, has full access to the complete drafts system, even when it is turned off!

	example (2) .... (user: new_user)

	0, 1, 3, 3, 3

	value (1) = 0 <- $vboptions['draft_group']
	value (2) = 1 <- $vboptions['draft_new']
	value (3) = 3 <- $vboptions['draft_reply']
	value (4) = 3 <- $vboptions['draft_pms']
	value (5) = 3 <- $vboptions['draft_attach']

	So user: new_user, can not access the drafts system, it does not matter if they have permission for secondary options!
	Because the (1) option gives no access, and that option controls the other options!

	example (3) .... (user: other_user)

	1, 0, 1, 0, 2

	value (1) = 1 <- $vboptions['draft_group']
	value (2) = 0 <- $vboptions['draft_new']
	value (3) = 1 <- $vboptions['draft_reply']
	value (4) = 0 <- $vboptions['draft_pms']
	value (5) = 2 <- $vboptions['draft_attach']

	So user: other_user, can access the drafts system, but is limited to the following.

	the draft systems master switch must be on for them to have access
	new post drafts are not allowed
	new reply drafts can be saved, but not quick reply drafts
	saving drafts in PM(s) is not alloWed
	saving attachments is only allowed when saving a new reply!

C, ya...


Sonia
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01205 seconds
  • Memory Usage 1,799KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete