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

[BUG] User with custom capabilities: elementor won't save the page/cpt #2846

Closed
EdenK opened this issue Nov 28, 2017 · 1 comment
Closed
Labels
bug Indicates a bug with one or multiple components.

Comments

@EdenK
Copy link

EdenK commented Nov 28, 2017

Users without the capability 'edit_posts' can't save pages or custom posts types that thay have edit capability.

Fix is require:
file: elementor/includes/editor.php line: 738

The function create_nonce should check for capabilities instead of using the constant
const EDITING_CAPABILITY = 'edit_posts';

This edit fix this issue

public function create_nonce() {
	if ( ! current_user_can('edit_'.get_post_type( $this->get_post_id() ) ) ) {
		return null;
	}

	return wp_create_nonce( self::EDITING_NONCE_KEY );
}
@EdenK EdenK changed the title User with custom capabilities: elementor won't save the page/cpt [BUG] User with custom capabilities: elementor won't save the page/cpt Nov 28, 2017
@bainternet
Copy link
Contributor

@EdenK

We are already working on a fix.

@bainternet bainternet added the bug Indicates a bug with one or multiple components. label Nov 28, 2017
This was referenced Nov 28, 2017
@KingYes KingYes closed this as completed Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates a bug with one or multiple components.
Projects
None yet
Development

No branches or pull requests

3 participants