Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(csv-import): Add a filter to change the user capabilities to allow to import markers #272

Open
kevinwhoffman opened this issue Aug 22, 2018 · 0 comments

Comments

@kevinwhoffman
Copy link
Contributor

@marutim commented on Fri May 25 2018

User Story

As a user, I want the flexibility in the user roles/capabilities that can import a csv for markers.

Now the user capabilities is set to if ( ! current_user_can( 'install_plugins' ) ) which creates an issue for a setup where the admin has disabled this by adding the below to the config file.

define( 'DISALLOW_FILE_MODS', true );
define( 'DISALLOW_FILE_EDIT', true );

This will block users being able to use the plugin and theme installation/update functionality from the WordPress admin area.

Possible Solution

Add a fllter to the following lines to let the admin change the user capabilities to something like create_users to make this work.
https://github.com/WordImpress/Maps-Builder-Pro/blob/master/includes/admin/import-export/class-marker-importer.php#L251
https://github.com/WordImpress/Maps-Builder-Pro/blob/master/includes/admin/import-export/class-marker-importer.php#L336

Related

This was reported by a user here: https://secure.helpscout.net/conversation/563906640/17105/?folderId=672191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants