• Hi All…

    Is there a plugin that will allow me to restrict certain user groups from posting to specific categories?

    Cheers!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Social Access Control will allow you to restrict what category/categories a user can assign to posts. But also causes those categories to not be visible when visiting the blog.

    Bind User To Cat does allow you to restrict a user to a category but see other categories on the blog.

    Note that even though the plugin page says “Restricted users won’t view the category selection panel in edit screens” at 2.7.1 you can check other categories when writing a post, but only the category ‘bound to the user’ gets assigned the post.

    With Social Access Control, does that also hide the comments linked with posts associated with the categories? I currently use User Access manager 7.0.1, but the comments are showing on the dashboard and comment list for all to see. Everything else works great. And I do have checked the Hide comments under settings, but not working????

    Oh, and using 2.7.1 wp

    Thread Starter threevisual

    (@threevisual)

    Thanks for the links, I’m trying to find something that won’t allow users to see restricted categories in the edit screen though. Any other ideas?

    Have you looked into User Access Manager? I like it. To solve my problems from above, I created a new blog just for a private group. Security was very important and I couldn’t take ANY chances someone could read a comment.

    ThreeVisual: I’ve been travelling the forums and the net looking for the same solution and I finally came up with a combo that’s easy to use and works great.

    First I created a new user role using the Role Manager plugin (you can disable the plugin after you’ve used it and the roles remain).

    Then I bound individual users within the new role to specific categories made only for them using the Bind User to Category plugin.

    Finally, I hid options and selections (including the category selection option) from those users with the Adminimize plugin. This last plugin was the key that I had been searching for and couldn’t find.

    Now, userA can only post to the userA category and it’s by default. userB can only post to the userB category by default, etc.

    Hope this helps.

    Thanks dakranii.
    This was very helpful. Brilliant advice.

    One thing I did differently was use User Assign Categories instead of Bind User To Category

    The main problem I have is that I want to create User Groups and so with Bind User To Category, if I let an admin of one group delete posts for others, it gave them permission to delete all posts.
    User Assign Categories restricts these group admins to their own category.

    On further consideration, I realise that Bind Users To Category is still of use to me.

    Bind Users To Category will force the specified category (prevents unassigned). User Assign Categories serves a separate purpose of limiting access to categories.

    All rather fiddly but the 4 plugins appear to be working fine together for now. Suits my limited needs.

    Hi Ribbontree,

    can you detail the way you bind users ?
    I tried the plugin “bind user to category”, but it doesn’t work with wp 2.9.1 (even if I change this, the page appear in the admin panel, but the binding isn’t applied)

    I think I will have a look to limit categories plugin

    Thank you !

    Hi rwanito,

    I can’t remember the specifics of what I did with that plugin. Since my previous posts, I have realised a circumstance where Bind Users To Category won’t work for me. Some users need to have multiple category access and I need them to be able to choose which category to use.

    I know that Bind Users To Category did do exactly what I expected on version 2.9.1. When a user was bound to a category, I believe their posts were automatically assigned to that category.

    In case anyone is reading this and is wondering what I’m doing to allow some users to have multiple categories, I’m still working on it, but so far I have adjusted the level2categories plugin and setup roles with various levels. I am relatively new to WP and not familiar with where the roles are stored, so have come up with an ineloquent workaround. I only have a few categories, so I can get away with this particular workaround. If you have more than three categories, you may not have enough user levels to handle all permutations. You would then need to find out how to assign another variable to roles.
    Basically
    User level 1 only has access to category 1
    level 2 – cat 2
    level 3 – cat 3
    level 4 – cat 1 & 2
    level 5 – cat 1 & 3
    etc
    Only the admin will need access to all three categories. I am leaving the category general (unassigned) as disabled to all users. If someone does not select a category, they will be forced into general, the post is then not displayed on the site and will need someone to assign it to a different category.

    I changed the l2c_disable_cats() function to

    function l2c_disable_cats(){
    	global $l2c_table, $user_level;
    	$query=mysql_query("SELECT * FROM $l2c_table");
    	$cat_total=mysql_num_rows($query);
    	if ($cat_total > 0) {
    	/* categories represented by levels
    	1 - Lacrosse
    	2 - Cricket
    	3 - Sports
    	4 - Cricket/Lacrosse
    	5 - Lacrosse/Sports
    	6 - Cricket/Sports
    	*/
    		echo "<script>";
    		if (($user_level == 1) || ($user_level == 2) || ($user_level == 4)){
    				echo "document.getElementById('category-3').style.display='none';";
    				echo "if(document.getElementById('popular-category-3')) document.getElementById('popular-category-3').style.display='none';";
    			}
    		if (($user_level == 1) || ($user_level == 3) || ($user_level == 5)){
    				echo "document.getElementById('category-4').style.display='none';";
    				echo "if(document.getElementById('popular-category-4')) document.getElementById('popular-category-4').style.display='none';";
    			}
    		if (($user_level == 2) || ($user_level == 3) || ($user_level == 6)){
    				echo "document.getElementById('category-5').style.display='none';";
    				echo "if(document.getElementById('popular-category-5')) document.getElementById('popular-category-5').style.display='none';";
    			}
    		if ($user_level < 7){ //Disable general unless level 7 or higher
    				echo "document.getElementById('category-1').style.display='none';";
    				echo "if(document.getElementById('popular-category-1')) document.getElementById('popular-category-1').style.display='none';";
    			}
    		//Check by default for users with just one category
    		if ($user_level == 1)
    		{
    			echo "document.getElementById('category-5').checked = true;";
    		}
    		if ($user_level == 2)
    		{
    			echo "document.getElementById('category-4').checked = true;";
    		}
    		if ($user_level == 3)
    		{
    			echo "document.getElementById('category-3').checked = true;";
    		}
    		echo "</script>";
    	}
    }

    Right… Scrub what I said above. It falls down with user levels, I knew it wasn’t perfect, but I didn’t realise that user levels would overrule the User Assign Categories plugin. It broke with a user on level 6. Back to the drawing board. I’m gonna tear a lot of my hair out with this.

    Hi all,

    I’m still searching, but i’m not alone ..
    I’am testing your solution, thank you Ribbontree

    Do you know “user-access-manager” ?
    http://wordpress.org/extend/plugins/user-access-manager/

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Post to category restriction?’ is closed to new replies.