Questions tagged [user-access]
The user-access tag has no usage guidance.
34
questions
12
votes
5
answers
27k
views
How to restrict access to uploaded files?
I have a restricted area on a website that can only be accessed by logged in users. For that I created a page template with a 'current_user_can()' condition.
My problem is that the documents attached ...
35
votes
5
answers
67k
views
Allow member to have access to custom post type only. Permission to only edit their own posts
OK I'm looking for the best way to attack this.
I'm very comfortable with PHP and making custom post types with custom meta fields in WordPress.
Here is what I'm looking at doing:
User registers ...
29
votes
4
answers
56k
views
How do I create a custom role capability?
I wish to create a custom capability for accessing the interface of my plugin.
Should the plugin manage adding this capability to all the administrator accounts on activation?
If so: Does WordPress ...
10
votes
1
answer
5k
views
Filtering the Admin Comments List to Show Only Comments from the Current User?
In the Comments page (/wp-admin/edit-comments.php), every logged in user can see all the site comments.
I'd like the users to see only his/her own comments and the comments that are left to his/...
6
votes
1
answer
12k
views
How to assign specific users the capability to edit specific pages / posts / custom post types
I'm trying to implement what seemed like a relatively straight forward idea, basically I am building an access control plugin to control viewing and editing of a custom post type (in this case '...
7
votes
4
answers
17k
views
Allowing users to edit only their page and nobody else's
We currently have about 50 pages, each of which I want a user (eg, bob, rob, smith) to be able to edit only 1 page. For example, bob & smith each have their own page. I do not want bob to be ...
6
votes
5
answers
7k
views
How can I hide a category from Contributors in the edit/add new post screen?
I have a situation where I need to hide a specific category and it's children from users who are logged in as Contributors. I don't want them to see this category and it's children in the categories ...
5
votes
3
answers
17k
views
How can I hide media library images from general users?
As an admin I really like the features and functionality of the WordPress 3.5 media manager.
With a multi-user site however all users can see all images in the media library - whether uploaded by ...
5
votes
3
answers
9k
views
Only allow administrators and editors to access wp-admin
I am trying to restrict access to wp-admin so that only administrators and editors are allowed. At the moment I am using this function:
function restrict_admin(){
//if not administrator, kill ...
4
votes
1
answer
3k
views
Using JWT to authenticate a user with an external system?
We have a WordPress application which is going to be linked with a parent system. We want to use JWT for authenticating with the parent. The idea is, if the user is not logged in on the parent, he ...
2
votes
2
answers
13k
views
Only show category to certain user levels without plugin
I'm building a site for some army guys to share photos, and one thing keeps stumping me.
They have some photos that they'd like everyone who is signed up for the site to view, and others that just ...
1
vote
1
answer
54
views
if role is logged in then do something
I need some pro eyes please.
Over all, I'm adding one button/link to the MAIN NAV depending on the logged in role.
I have this “working” code:
if ( ! function_exists( 'add_extra_item_to_nav_menu' ) ){
...
22
votes
2
answers
40k
views
How to check if user is in back end?
In my application, i have one form.
Now if user is in front end i want to display the title but if he is in back end i do not want to display it.
I do not want to check it based on user role.
21
votes
3
answers
2k
views
How to enable suggested edits?
I like the idea of enabling any user of my website to suggest edits to a page. Much like the edit system on Stack Exchange but different in that anyone should be able to edit, not just registered ...
12
votes
5
answers
12k
views
How to restrict attachment download to a specific user?
I have a very specific use case where the site built for a lawyer and each of his clients can login to their own 'specific page/portal' (custom post type) without the ability to access wp-admin etc. (...
7
votes
2
answers
24k
views
Restrict admin access to certain pages for certain users
As the title says, I'd like to restrict back-end access to certain pages for certain users.
While doing a site with 45-50 pages, I realised it would be a much better user experience if the Page menu ...
6
votes
5
answers
13k
views
Troubleshooting a "You do not have sufficient permissions to access this page" error
I have a multisite installation running WP 3.5. My main site and a few other blogs on the network work fine. However, if I register a new user and site, that user gets the "You do not have sufficient ...
4
votes
1
answer
2k
views
Restrict users on multisite WordPress install
I have a series of sites that I maintain as part of a WordPress multisite install. I'd like to be able to create users accounts that are restricted to viewing only a single one of these sites. Is ...
4
votes
7
answers
15k
views
Website Visible only to Registered users
How can I disable access non registered users? If the user is not logged in I would like to redirect them to a custom registration/login page. Is it possible this using below code as I dont want to ...
3
votes
3
answers
13k
views
Temporarily disable user role login and replace with message
Is there a simple way to temporarily stop a user role logging in with wordpress?
For example, if I have a user role called media, how can I block them from logging in?
I would like a custom message to ...
2
votes
3
answers
19k
views
Remove Custom Post Type menu for non-administrator users.
I've been researching this all day and haven't come up with much results.
I want to restrict who can see my Custom Post Types by User Level (or some other way). So if the person logged in is not an '...
2
votes
2
answers
1k
views
create a back-end wordpress content submission using custom post type
I have a previously created thread here, but was recommended to make a new one:
I need basic help with custom post types
Basically here's my project:
I have to create a back-end wordpress gui user ...
2
votes
1
answer
381
views
Is there an existing capability to allow editing of only pre-existing pages? If not, a good way to implement this?
I'm working on a setup for which I need general users to be able to edit a specific list of pages, but not create any new ones.
Looking through the Codex, I don't see anything that will come close to ...
1
vote
2
answers
226
views
moving server can not login
I design my site in win7 system, and today before a server rent, I moving my blog from win7 to my another computer witch is installed CentOS 5.5 for a last test, I have reference the article http://...
1
vote
1
answer
1k
views
Restrict the user access in multi site for non-assigned blogs
What is the better way to restrict a user of any role being logging into a blog of wordpress multisite network if he/she is not assigned to that particular blog as a user even though he is an ...
1
vote
1
answer
3k
views
pre_get_posts Remove posts based on meta value with 'post__not_in'
I am attempting to alter the query of pages where the post meta value of _members_access_role does not meet that of the currently logged-in user. Here is what I have so far:
// Get all posts with the ...
1
vote
3
answers
11k
views
Add new media uploader at frontend for wp 3.5+
I create a form for user to submit content from the frontend. The only problem is I don't know how to handler the image upload.
So, I want to know how to use the WP media uploader in the frontend. ...
1
vote
1
answer
2k
views
How to automatically apply a password to all posts within a custom post type
I am creating a custom post type, for which I want all posts to be password-protected with the same password.
I realize that I can set a password on a post-by-post basis from within the admin panel, ...
1
vote
1
answer
3k
views
How to make user inactive by default while registering?
When user registers to my site I want to make them inactive by default so I can manually update their status and send them their login info. I am using wordpress 3.1.2. Is it possible? Are there any ...
1
vote
1
answer
2k
views
How to display only logged in user's post comments in comments area
I am making a custom Wordpress site where School students logged in and add their posts.
I am giving them rights to use wp-admin panel with little customization and modification.
QUESTION: "How can ...
0
votes
1
answer
4k
views
Issue with front-end ajax, getting a 302 redirect when accessing wp-admin/admin-ajax.php
I want to use wp ajax for frontend logged in user but showing error of 302 Found and call home page.
it is working fine for admin users and non logged in users.
here is network log screenshot:
i ...
0
votes
2
answers
10k
views
Custom user profile, registration, login page with theme
WordPress user profile page uses the administration interface, and its user registration / login page is not part of the theme. I would like to
change it into the custom theme of my site
customize ...
0
votes
2
answers
3k
views
Front end user meta options for users
I have created user meta options using this tutorial. Now I want to know how to allow users to edit (update) certain custom user meta options that I created.
Users already have a template account ...
0
votes
1
answer
2k
views
Is there a way to set the user Role based on email domain
For example if a user registered with the email domain:
[email protected]
They will be set as a contributer.
but if any other email such as
[email protected]
they will be set as a subscriber?
...