Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-15-2013, 09:05 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Private Blogs: Permissions for Supermoderators

I have posted over at vBulletin.com but it keeps getting buried and Wayne doesn't seem to understand the issue: Question: How do I set permissions so member blogs are really private?

I have played with all combinations of permissions that might be related to blogs at
  • AdminCP >> vBulletin Blog >> Blog Moderators
  • AdminCP >> Usergroups >> Super Moderators --> various blog permissions
  • AdminCP >> Forums & Moderators > Show All Moderators --> individual moderators permission
I can set it so that moderators and regular members can see ONLY their own blogs.

I can set it so that Super Moderators can see ALL blogs, public or private.

I can NOT set it so that moderators and regular members can see PUBLIC blogs but Not private blogs.

Quote:
Originally Posted by Wayne Luke;n3969695
Aside from the Blog Moderators that you give permissions to, Users control who can view and cannot view their blogs. They do this by going to their User Control Panel by clicking Settings in the top right corner. Next they would click on "Blog" in the left navigation. Finally they would edit their privacy under Permissions and Privacy. If they want to set it so only people on their contact list can view and reply they can. That is about as private is it gets though.
No. Please read what I have written more carefully.

I have no blog moderators, only supermoderators.

1. I can set those supermoderators to be able to view blogs from other members, in which case they can view blogs even when the members has made the blog private and not given specific permission to the moderators to have access; OR

2. I can set it so supermoderators cannot view blogs from others, in which case they cannot even view public blogs.

I can find no combination that results in supermoderators being able to view public blogs but not private ones.

What you describe, Wayne, is logical and would be exactly the way I would expect it to work, BUT it simply does NOT work that way.


Any ideas? How can I accomplish this either with native vBulletin or with a customization.
Reply With Quote
  #2  
Old 05-15-2013, 11:28 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To clarify: if a member makes a blog private, a supermoderator is still able to read the blog -- this is the unwanted condition. Are you looking for some source code changes or are you just looking for a vbulletin permission / conditional that can handle it?

I am a little confused because I know you code. Anyway, trying to help, just need to know what your looking for.
Reply With Quote
  #3  
Old 05-15-2013, 11:51 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is exactly the situation: Supermods (and maybe regular mods - I don't have any) can read private blogs.

And yes I can do some basic coding but I'm not sure why this isn't a built-in standard option or where exactly I would need to customize to override this. I don't think Wayne is either.

If someone knows how to do this or would like to create a plug-in for me, I am willing to pay.
Reply With Quote
  #4  
Old 05-16-2013, 12:09 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will take a quick look at this for you, when I get home. Waiting for my delayed flight at the airport right now. You share your work with the community so lets see if the community can assist you.
Reply With Quote
  #5  
Old 05-16-2013, 01:13 AM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you.
Reply With Quote
  #6  
Old 05-16-2013, 03:52 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I grabbed a fresh vbulletin to my laptop and looked at some of the code. I am not sitting at my development station so I cannot test this.

This is a quick fix, but it also banishes the administrator from seeing the
private blogs.

Code:
"/includes/blog_functions_share.php"
approximately line #46. Try commenting out
"$issupermod = TRUE". See below:

Code:
	if ($modinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'])
	{
		DEVDEBUG('  USER IS A SUPER MODERATOR');
//		$issupermod = true;    // <-- Comment this out.
	}
Once I am at my development station we should be able to come up with a more solid fix. Anyway, let me know if this works.

The only time I have used the blogging system is for my daughters board. So I do not have a firm grasp on the permissions, but I clearly see in the code where privacy permissions are bypassed for supermoderators.
Reply With Quote
  #7  
Old 05-16-2013, 12:49 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, tbworld.

The file is actually /includes/blog_functions_shared.php

I commented out the line you highlighted

Code:
if ($modinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'])
	{
		DEVDEBUG('  USER IS A SUPER MODERATOR');
//		$issupermod = true;    // <-- Comment this out.
	}
plus just below that

Code:
	if (empty($do))
	{
		if ($issupermod)
		{
			// return true;  // <-- comment this out
		}
		else if (isset($modinfo['isblogmoderator']))
		{
			if ($modinfo['isblogmoderator'])
			{
				DEVDEBUG('	USER HAS ISBLOGMODERATOR SET');
				return true;
			}
			else
			{
				DEVDEBUG('	USER DOES NOT HAVE ISBLOGMODERATOR SET');
				return false;
			}
		}
I can confirm that this prevents both Admins and Supermoderators from being able to view private blogs.
Reply With Quote
  #8  
Old 05-16-2013, 05:15 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure if you have to undo the code changes you made after trying this method. I also don't have any blogs on my test site to test this with

Go to user group manager / supermods
Scroll down to the administrator permissions are
Select YES for can access control panel
Save

Go to user groups / admin permissions
Click on edit permissions (will have to do this one by one)
Adjust permissions (can admin blog and can admin blog permission to NO )
Save

Test and report back here if it works.
Reply With Quote
Благодарность от:
tbworld
  #9  
Old 05-16-2013, 08:52 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Lester View Post
Test and report back here if it works.
Great Suggestion John!

Unfortunately, mine were already defaulted to 'NO so it did not make any difference.
I had completely forgotten about that menu, on the board I run we have rewritten the permission system so we do not use super moderators, nor blogs. Your suggestion should help others here if they are reading the thread

It does seem odd that this permission was overlooked, so I had to check your idea out. Permissions can be embedded anywhere, I could have easily overlooked it in my 10 minute search.

--------------- Added [DATE]1368743195[/DATE] at [TIME]1368743195[/TIME] ---------------

hmm.. Nothing in the bitfields for a direct permission. Onto the cache, maybe it will unearth some details.
Reply With Quote
  #10  
Old 05-16-2013, 09:39 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Lester View Post
I'm not sure if you have to undo the code changes you made after trying this method. I also don't have any blogs on my test site to test this with

Go to user group manager / supermods
Scroll down to the administrator permissions are
Select YES for can access control panel
Save

Go to user groups / admin permissions
Click on edit permissions (will have to do this one by one)
Adjust permissions (can admin blog and can admin blog permission to NO )
Save

Test and report back here if it works.
Thanks for the suggestion.

Unfortunately, that does not work. Following all your instructions, Supermoderators can still see private blog posts (actually all the admin permissions were set to No by default). They just can't edit or otherwise moderate them them.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07160 seconds
  • Memory Usage 2,271KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete