Forum Replies Created
-
AuthorPosts
-
August 11, 2015 at 6:45 pm in reply to: Role needs to permit View and Use of Library Media – But NOT Add New Media #14248Syam MohanKeymaster
Hi Steve,
WordPress only checks on ‘upload_files’ to give upload permission. But that capability is also needed to give access to media library. As you said, you will be able to remove the “Add New” using menu editor, but the “Add New” within the Media Library uses ajax upload so it won’t be limited. So its not possible through the UI at this moment.
I could give you a code snippet that you can add to your functions.php to limit the user from uploading files if you are comfortable with it.
Thanks
Syam
Syam MohanKeymasterCan you also check your PHP opcache revalidation setting?
Syam MohanKeymasterHi Bratt,
I was able to connect successfully. But the changes I make within the PHP code takes lot of time to reflect on the web page. Either you have a caching plugin or your PHP opcache re-validation frequency is low. I didn’t try with deactivating the plugins, if in case this is a live site.
Thanks
syam
Syam MohanKeymasterCan you also send me the location of your template file and the url/page I need to access to test it?
Thanks
Syam MohanKeymasterIs it possible for you to give me access to your site?
Thanks
Syam MohanKeymasterThe code I sent you can only be executed after the plugins have been loaded. Otherwise it won’t work, since the login redirect settings comes from a plugin. Can you try to execute it in the ‘plugins_loaded’ action?
Thanks
Syam MohanKeymasterWhen is this code executing?
Syam MohanKeymasterif(is_user_logged_in())
wp_redirect(apply_filters(‘login_redirect’, ‘/’));
else
wp_redirect(‘/wp-login.php’);I did not test the code, just wrote it here. Let me know if it doesn’t work.
Thanks
Syam
Syam MohanKeymasterHi Bratt,
Not possible using the plugin right now. But I could give you some code to add to your page template if you are comfortable with it.
Thanks
Syam
Syam MohanKeymasterHi Kregg,
Yes, you can remove any capability from any role as long as other plugins doesn’t override it.
To remove capabilities from Administrator role, use the Add or Remove Capability feature.
Thanks
Syam
Syam MohanKeymasterHi Stephen,
I’m glad that you got this figured out.
Thanks
Syam
Syam MohanKeymasterHi Claudio,
You can bulk edit extended permissions.
https://wpfront.com/user-role-editor-pro/bulk-edit/
Thanks
Syam
Syam MohanKeymasterHi Claudio,
You can restrict access using Extended Permissions. Here is the documentation.
https://wpfront.com/user-role-editor-pro/posts-pages-extended-permissions/But it only works against roles, not users. To restrict access to a specific user create a role just for that user and restrict access to all roles except this new role.
Thanks
Syam
Syam MohanKeymasterHi Samantha,
The WordPress login page is not just for Admin users. Any user with an account will be able to login through it. There are lots of sites out there which uses the default login page for their site’s login with a new theme.
With that said I’m not asking you to change your site’s login page to default page. That was for testing and debugging purpose only. Just like I asked you to deactivate other plugins and change your theme. I’m not asking you to permanently deactivate all your plugins. All these actions are to find from where the issue is coming from. We can only safely fix an issue, if we know from where it’s coming from.
Since the redirect works on the default login, now we know the login redirect configuration works. So we can eliminate that variable. The issue seems to be your font-end login form discarding the redirect configurations. You mentioned that it’s hard coded there. Can you send me the code?
Thanks
Syam
Syam MohanKeymasterHi Samantha,
How/Where do you host your site? Usually you will be able to create FTP accounts from your hosting provider’s control panel.
I took a look into your site, here are my findings.
Login redirect is working. If you use the default WordPress login method you can see that it is working. (I asked you test this in my previous reply, may be you didn’t understand). To test the default login method, append /wp-admin to your domain and browse. It will redirect you to the default WordPress login page.
So the login form available on your website front end is not using the login redirect settings. How are you creating that form?
I have changed the password of the “test” user to the same password you set for my account for testing.
You can hold the FTP account creation, I probably won’t need it since login redirect is working. This seems to be a plugin/widget/theme issue.
Thanks
Syam
-
AuthorPosts