View Full Version : Private Blogs: Permissions for Supermoderators
djbaxter
05-15-2013, 09:05 PM
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? (http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/3968877-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.
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.
tbworld
05-15-2013, 11:28 PM
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. :)
djbaxter
05-15-2013, 11:51 PM
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.
tbworld
05-16-2013, 12:09 AM
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. :)
djbaxter
05-16-2013, 01:13 AM
Thank you. :)
tbworld
05-16-2013, 03:52 AM
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.
"/includes/blog_functions_share.php"
approximately line #46. Try commenting out
"$issupermod = TRUE". See below:
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.
djbaxter
05-16-2013, 12:49 PM
Thank you, tbworld.
The file is actually /includes/blog_functions_shared.php
I commented out the line you highlighted
if ($modinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'])
{
DEVDEBUG(' USER IS A SUPER MODERATOR');
// $issupermod = true; // <-- Comment this out.
}
plus just below that
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.
John Lester
05-16-2013, 05:15 PM
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 :D
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.
tbworld
05-16-2013, 08:52 PM
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 1368743195 at 1368743195 ---------------
hmm.. Nothing in the bitfields for a direct permission. Onto the cache, maybe it will unearth some details.
djbaxter
05-16-2013, 09:39 PM
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 :D
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.
tbworld
05-16-2013, 09:48 PM
Can you assign a super moderator to a single blog? If so how?
and
How do you assign a moderator to a blog?
Before we make an administrative fix (easy enough), I am trying to see if I missed something. There is code that shows if they pass any other parameter to the function that it checks for additional supermod permissions.
djbaxter
05-16-2013, 10:00 PM
Can you assign a super moderator to a single blog? If so how?
Not that I know of.
How do you assign a moderator to a blog?
AdminCP > vBulletin Blog > Blog Moderators
I have no one assigned as a Blog Moderator.
tbworld
05-16-2013, 10:16 PM
Not that I know of.
AdminCP > vBulletin Blog > Blog Moderators
Thank You
But <-- LOL, You know theres always a but! :)
What I am looking for and maybe it doesn't exist, is if you can assign a moderator to a particular blog. I should have clarified better. Like to a forum, you can assign the moderators for that forum.
--------------- Added 1368748714 at 1368748714 ---------------
How to Moderate Blog Entries in Vbulletin 4
* Go to the main blog page
* Find the "Filter" menu on the bottom of the page. Click on "Moderated Blog Entries".
* Click the checkbox for the entries you like to approve
* Click on the Moderation menu to expand, click to select "Approve Blog Entry " or any other action you like.
* Click on the Proceed button.
I see... They are moderated via entries and comments not by the poster. Makes sense.
djbaxter
05-16-2013, 11:06 PM
Yes. It seems to be global - all or nothing. Very restrictive.
tbworld
05-16-2013, 11:16 PM
Okay, I have a few more things to research, but here are the choices:
I am just making these Up:
CanAdminViewPrivateBlog (No, Always, Yes-if-member)
CanSuperModViewPrivateBlog (No, Always, Yes-if-member)
CanModeratorViewPrivateBlog (This may already exist, haven't test).
It seems to me, I would add the condition "If they are a blog member or contact" they can view the blog.
So something like this:
vB::$vbulletin->bf_misc_vbblogoptions['private'] AND is_member_of_blog
Areas that will require testing:
Moderation Blog Entry
Moderation Blog Comment
Taggable Content
Recent Blog Posts
Recent Blog Commenjts
Activity Stream
CMS Widget Recent Blog Posts
CMS Widget Recent Blog Comments.
Blog Subscription
Blog Usercp
Ahh we are beginning to see why they did not want to mess with it.
John Lester
05-17-2013, 12:25 AM
Ok I think I found a solution for you :)
So I set up blogs on my test forum, made 3 entries, created a supermod and did some testing :D
If you do not have Blog Categories you are going to have to create them. If you do have Blog Categories then you need to make some decisions based on the solution.
Assuming you have blog cats (or just created some either way :D ) go to acp vbulletin blog / blog cat perms ... edit super moderators and set both options to NO. EDIT to add ... make sure you select "use custom permissions" up on top of the page.
Any blog entry in that category will not be visible to super mods.
Now, if you already have blog cats but don't want all blogs in a particular blog cat blocked to super mods ... you're going to have to move those to a different blog cat.
tbworld
05-17-2013, 12:37 AM
I think you are right 'John' I believe on that side of things there is restriction for super-mods. I was coming to the same conclusion although I had not checked the assumption. I was currently in activity stream blog hell. :)
Now I have a question: if the blog is private, why do we need to select the check-box "Restrict Entry Viewing to Contacts and Blog and Moderators." to have it show as private and restrict it from the activity stream?
My thinking must be off on 'Setting permission for the blog private'. If I have to check that check-box, then what is a private blog besides not being a public blog.
One interesting thing did happen, I was fooling around with the categories the same time you posted. Is when I enabled the categories for blogs, it was the first time the "additional options" section appeared or maybe I overlooked it.
Thanks for your input!
I am going to play around with the blog categories. Your approach might be the simplest method. If all we have to do is toss private blogs into a category called 'PRIVATE BLOGS' :)
--------------- Added 1368754878 at 1368754878 ---------------
Too much jet lag, I keep spelling "glob" instead of "blog" :)
--------------- Added 1368759431 at 1368759431 ---------------
Ok I think I found a solution for you :)
Your suggestion is a good one, unless you run secondary groups. If they are a member of a secondary group you will also need to shut off permissions there. In my case that would be a problem, but I might be the exception.
Throwing the private blogs into a category was painless and so far this is the easiest work-around. ;)
John Lester
05-17-2013, 03:30 AM
With regards to having to check the box "Restrict Entry Viewing to Contacts and Blog and Moderators." on private blogs is to prevent members not on your contact / blog list from seeing your blog. I am assuming that making the blog private only prevents guests from viewing it, therefore the box to restrict entry.
I am not a fan at all of how vB did the blog and permission system. It is entirely too complicated and too rigid for my tastes.
I did not consider secondary groups ... yea that could be an issue in some situations. I would suggest cloning the secondary user group(s) of your supermods so you can block both groups without affecting non supermods.
tbworld
05-17-2013, 05:32 AM
With regards to having to check the box "Restrict Entry Viewing to Contacts and Blog and Moderators." on private blogs is to prevent members not on your contact / blog list from seeing your blog. I am assuming that making the blog private only prevents guests from viewing it, therefore the box to restrict entry.
Interesting. I run a private board so I did not even think about that. Thank you! :)
I am not a fan at all of how vB did the blog and permission system. It is entirely too complicated and too rigid for my tastes.
I really have never used the blog system. I am just trying to help out 'djbaxter'. Now that I am looking into the code, I am less impressed. The permission system seems to be patched on top of being patched. My own software gets like that overtime too, so I am not going to harp on the vb developers.
I did not consider secondary groups ... yea that could be an issue in some situations. I would suggest cloning the secondary user group(s) of your supermods so you can block both groups without affecting non supermods.
That was my first thinking to and I might come back to it. I am looking at creating another bit in the bitfield to handle supermod and if set then unmasking the 'private' bit in function "can_moderate_blog()". It is only a concept and I have not worked it all out.
Hey, thanks so much for the help. Hopefully I can return the favor :)
John Lester
05-17-2013, 06:59 AM
I too thought about making a bit field for supermods and private blogs ... but I think it's a bit beyond my skill level right now :D
djbaxter
05-17-2013, 12:57 PM
Really busy in my day job this week but I just wanted to let you know I am following this still and will try out some of the suggestions on the weekend.
It really is a poorly thought out mess, isn't it?
djbaxter
05-19-2013, 12:44 PM
Throwing the private blogs into a category was painless and so far this is the easiest work-around. ;)
How did you set the permissions for blogs in the private category?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.