The capabilities tag has no wiki summary.
0
votes
1answer
18 views
get_posts() doesn't consider user permissions
I want to show a list of links to posts for the logged in user on my wp.
So I started to do so:
$posts_array = get_posts( array( 'post_type' => 'download', 'post_status' => 'publish' ) );
...
0
votes
0answers
13 views
Custom taxonomy not working after capability change
I have a custom taxonomy, that worked fine. Until I did the following:
Added new role
Assigned a new capability for the taxonomy
Created new post type, and assigned the taxonomy to it (The cpt name ...
1
vote
0answers
21 views
Restrict edit, but allow preview for custom post status
I am developing a Wordpress site with Edit Flow plugin, so I can create custom post statuses to manage author and contributor posts more easily.
So I have created custom post status and I've got ...
0
votes
1answer
24 views
Roles and Capabilities in Custom Post Types
Is there a way to create one role with one capability and apply it to some of the custom post types?
What I am doing right now is ending up with applying capabilities to all of the posts..
creating ...
0
votes
0answers
21 views
Create new capability but restrict to specific page
I am using a custom upload box to allow a subscriber to upload their own avatar. currently the upload is failing as subscribers do not have media upload permissions.
I do not really want to enable ...
0
votes
1answer
26 views
Conflict between Capabilities and Menu Visibility with Custom Post Types
I hope this isn't just the result of typo on my end, but if it is, I'm not seeing it.
I'm adding a custom post type to my site. Actually I'm adding three. Two of them I'm trying to set custom ...
0
votes
0answers
32 views
Capability to read user's own draft post of CPT
I've got a custom role called 'Gym' and custom post type (CPT) called 'Story'. Every Gym user can create a draft of a story and view their own story drafts.
My 'Story' CPT have got the following ...
1
vote
0answers
33 views
Wordpress capabilities on pending post status
I have user with contributor user role. In default if you publish article as contributor you can only view it and you can't delete or edit it. But when you submit new post for review, you can do all ...
1
vote
1answer
24 views
User capability per post
According to Codex we can perform current_user_can checks for certain post_ID, but I fail to find any bit of info how to set a capability explicitly for that post_ID.
A follow up question - how to ...
0
votes
1answer
28 views
How can I have different groups of editors only allowed to edit certain parent+subpages?
I've tried a bunch of different plugins, including Role Scoper, Advanced Access Manager, User Account Manager and more, to accomplish this but can't seem to get it working right.
Basically, the ...
5
votes
1answer
111 views
Allow Editors to edit pending posts but not draft ones
I have a large number of users with Editor Capabilities that help to go through the post submissions. This is my current setup for this role:
As you can see, they are allowed to edit_posts and ...
0
votes
0answers
25 views
How to make a plugin appear only to a certain role of user?
I'm using a plugin called "Team Result", to create team results and things like that. It appeared on the dashboard for admin(me). As you can see in this print ...
1
vote
0answers
25 views
Purpose of Adding Capability to Role But Not Grant?
I am attempting to create a custom role upon activation of my plugin. Along with that role, I wanted to add new capability to that role to access later. Now, after reading the Codex, I am totally ...
2
votes
2answers
61 views
Read only capability for custom post in admin area
I'm actually building custom type to WP and need to be able to restrict post access to some user role, ie. in admin area, collaborators can see posts but can't edit them, just only open them as ...
0
votes
1answer
22 views
Completely remove ability to create users?
I have added the code below to a plugin:
add_action( 'admin_init', 'remove_add_users_cap' );
function remove_add_users_cap() {
$role = get_role( 'administrator' );
$role->remove_cap( ...
0
votes
0answers
16 views
Adding a capability to a role doesn't apply users that hold the role
When my theme is activated (after_switch_theme hook) I add caps to administrator role but it doesn't affect caps of the admin user.
$user_roles = new WP_ROLES();
...
0
votes
1answer
33 views
How to let a role handle media without post permissions
I have a CPT to replace my "post"-post-type, but I still need to be able to use attachments. The problem is, that attachments have the post-capabilities.
I don’t want to give post capabilities to my ...
1
vote
0answers
39 views
Unable to delete custom post types, confusion around capabilities
So I'm working on a plugin for creating a questions/answers system that's as simple and well-integrated as possible (not unlike this site) but am stuck at the creation of the custom post types.
You ...
0
votes
0answers
40 views
pages not found for custom user role
I've created a custom user role for my clients to allow them to manage theme options, and all the other capabilities that the default admin has with the exception of several capabilities that would ...
2
votes
2answers
62 views
What is the difference between “create_users” and “add_users” capabilities?
The codex lists both create_users and add_users under roles and capabilities.
Does anyone know what is the difference between these two?
1
vote
0answers
29 views
Is it wise not to use only meta capabilities for certain basic post types?
I've been a WP developer for a couple of years now but only recently has the concept of meta vs. primitive capabilities really "clicked" with me. I'm building some tools right now to allow easy ...
0
votes
1answer
35 views
“sufficient permissions” error for admin after duplicating WP database to new install
I recently copied the tables from a live WP install to a dev site for that same site. I've changed all the prefixes, the site/WP URLs, and the salt values.
I can successfully log into the new dev ...
0
votes
1answer
54 views
Custom role, capabilities, and post type: preview button wrecks things
I'm using the Members plugin to manage capabilities of a custom role that will only be able to edit/publish a custom post type that I created in my functions.php file. After much work, I got this ...
1
vote
1answer
33 views
Adding Custom Capabilites
So, I'm not sure if this is possible, but is it possible to add custom Capabilities?
So, I've written a group message application, that ties in with Wordpress. I only want certain members (set via ...
0
votes
0answers
31 views
cap_key problem when sharing users and usermeta tables with two installation
I'm following this Custom User and Usermeta Tables to share users and usermeta tables with two installation.
define('CUSTOM_USER_TABLE', 'bloga_users');
define('CUSTOM_USER_META_TABLE', ...
0
votes
1answer
86 views
Creating a folder structure
My WP site has a members area which they pay to get access to.
I want that area to be a subfolder, so something like site.com/premium/nameofpage.
I am aware of url rewriting, htaccess etc. Is that ...
2
votes
1answer
56 views
edit_comment capability for subscriber
I have given my site's subscriber role the following permissions (unserialized DB-query):
[subscriber] => Array
(
[name] => Reader
[capabilities] => Array
(
...
3
votes
1answer
112 views
Temporarily give 'manage_options' capability
In order to allow editors to edit other's author meta (update_user_attribute), I must give them the 'manage_options' capability or else I get a 'Cheatin' huh' die message. I only want to give them ...
0
votes
1answer
48 views
Grant access to admin menu?
I'm trying to grant the user role 'editor' to have access to the Users top-level menu, and then control which sub-menus they have access to. The add_action lives in the _construct method.
add_action( ...
0
votes
2answers
161 views
Reset Roles (or undo role changes on theme change)
I am creating a theme that deletes some user roles that are not necessary and creates others. (It deletes author and contributor and renames subscriber).
Everything works, but on theme deactivation, ...
2
votes
2answers
139 views
Adding capabilities to super admins
I'm developing a plugin that uses custom capabilities. Some of those capabilities need to be added to all users who are super admins. Currently, I'm using this code:
$supers = get_super_admins();
...
2
votes
1answer
152 views
Limit access to page depending on user level
I've been asked to build a WordPress that limits access to posts with a particular custom post type based on the logged in users level. There will be a number of pre made user roles and they would ...
1
vote
1answer
76 views
Prevent Editors from Editing/Deleting Admin Accounts
I need editors to be able to add/edit/delete other users. Giving them those capabilities is easy with code similar to this:
$editor = get_role('editor');
$editor->add_cap('edit_users');
The ...
0
votes
2answers
313 views
Show Welcome Panel on Dashboard for every user
I have customised the welcome panel on the dashboard for users with information in. I then hid the "Dismiss" button and added CSS to make the welcome panel always visible. Using the 'welcome_panel' ...
0
votes
0answers
136 views
Custom Post Type & Role Capabilities
Thanks to Matthew Boynes I was able to get user roles edited for one of my CPTs using a very elegant solution found here. Now I'm trying to get the same capabilities added to a 2nd CPT and for some ...
0
votes
2answers
168 views
Require Capability to View Woocommerce Product
I am using Woocommerce and I have products in a category called B2B whose single_product.php is only to be shown to people with the capability read_b2b.
<?php if ( have_posts() ) : ?>
<?php ...
2
votes
1answer
172 views
Apply custom role capabilities to administrator (without plugin)
I have a custom role that allows access to only a sigle custom post type. This is all well and good, but now it is only showing up for this role, not for admin and super admin. I'm having a hard time ...
0
votes
1answer
87 views
How to give “author” user role appropriate capabilities to add PollDaddy polls? WordPress multisite
At the moment, users with role "Author" can only view but not add or edit polls. "Editor" and "Administrator" (site administrator) can add and edit polls however.
This is despite the fact that I ...
0
votes
1answer
50 views
custom post type capabilities - needs to be VERY secure
Hi I'm trying to define custom post type capabilities for staff contracts on an intranet site, so due to the sensitivity of the information this needs to have as best security as possible and simply ...
0
votes
1answer
40 views
how to change capability required to view an admin page? [duplicate]
Possible Duplicate:
Hooking into add_submenu_page
This plugin uses add_menu_page function to create an admin page and I was wondering is there a way to change the capability that is set by ...
1
vote
1answer
59 views
Pending status by default for a specific role
I would like to prevent users from one specific role from publishing directly their articles.
Only administrators should be able to approve these.
The only choice they would ever have is to put their ...
1
vote
1answer
519 views
Hooking into add_submenu_page
Ever come across a plugin that is using the manage_options capability for a page that... really doesn't need to be? Well, I've come across just that.
This may be more of a general question about ...
0
votes
1answer
184 views
How to restrict specific post types from being read or added by specific user roles (eg. author)?
I'm not very clear how to restrict admin area post types access to specific user roles.
In my case, I have some post type such as "suppliers" which I do not want to show to "authors".
By default WP ...
5
votes
4answers
934 views
WordPress SEO by Yoast: Hide Meta boxes in posts for non-admins
I have multi-author website and I am not very comfortable for allowing all members to enter SEO details in the posts they are publishing. I would like this would be visible only to Administrator of ...
0
votes
1answer
60 views
Custom post type & role issues
I am having issues with using custom post types and custom user roles. I created a custom post type called Businesses. Then I created capabilities for users of a certain type to be able to add and ...
2
votes
2answers
94 views
Unify the roles and caps?
I installed several plugins(buddypress-docs,achievement,bbpress), each one create capabilities for their own post_type.
I would prefer to make all roles and capabilities unified into one system, Is ...
3
votes
1answer
194 views
Restrict users from editing post based on the age of the post
How can I restrict users (based on Capabilities) from editing their published posts after a custom amount of time.
For instance, a user that can publish_posts (authors) can not edit a their post if ...
4
votes
2answers
181 views
Add custom user capabilities before or after the custom user role has been added?
Should custom user capabilities be added before the custom user role has been added, or the other way around?
add_role() asks for and array of $capabilities in the third
parameter of the function.
...
1
vote
1answer
65 views
Is there a capability for managing plugin options?
I have an Editor user that I want to let use a plugin's options without being an Administrator.
I can use $user->add_cap but can't tell if any particular capability relates to the permission to edit ...
-1
votes
1answer
66 views
Explanation of User Roles and Capabilities
I'm developing a Wordpress theme. In this theme, there are a few custom post types.
Custom Post Types :
book
article
event
We are using Wordpress' default user roles (we can create new roles, if ...



