Forum Replies Created

Viewing 15 replies - 406 through 420 (of 3,096 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi András,

    I agree to investigate your site issue with users.php page.
    Contact me directly via support [at-sign] role-editor.com to proceed.

    “Add Role” is designed not to change current role, but to really add the 2nd role to the primary one. Thus if user has ‘Customer’ role, then after adding role ‘Private user’ user will have 2 roles simultaneously: ‘Customer’ and ‘Private User’ – as expected.

    In order to replace currently grunted role with another one for the list of selected users – you have to use WordPress built-in ‘Change role’ dropdown list or “Grant Roles” button from User Role Editor.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi Tash,

    Ninja Forms by default protects all its admin menu items with the ‘manage_options’ capability.
    It’s possible to change this for the custom capabilities via filters. Read this article if interested.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    It’s not possible without custom plugin, which is not easy to write. For example to swap image you have to change the link to the image, etc.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi again,

    Looking more thoroughly, I remembered that user->roles array indexing does not depend from the User Role Editor plugin. Look how WordPress builds the array of roles granted to user (file wp-includes/class-wp-user.php, function get_role_caps(), line #507:

    
    // Filter out caps that are not role names and assign to $this->roles.
    if ( is_array( $this->caps ) ) {
      $this->roles = array_filter( array_keys( $this->caps ), array( $wp_roles, 'is_role' ) );
    }
    

    If you look at the php.net for the array_filter() function documentation, you find, that

    Array keys are preserved, and may result in gaps if the array was indexed. The result array can be reindexed using the array_values() function.

    So if user has subscriber role, but it is 5th in the $wp_roles array, resulting $user->roles array will be looked this way array(4=>'subscriber').

    So primary role at the user’s roles array not always have the ‘0’ index. We have to use another way to get the 1st element of the roles array, than just a $user->roles[0].

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    Thank you.
    I will reindex the array of roles granted to user after the modification of the list of roles/capabilities granted to a user.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    AIO WP Migration plugin protects its menu this way:
    All-in-One WP Migration export
    Export export
    Import import
    Backups import

    So if WooCommerce (or some add-on for it) uses the same capabilities for import/export products, you can not block these menu items separately without help of some special plugin, which allows more advanced admin menu manipulation.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi Morten,

    URE does not change itself permissions required by WordPress or WooCommerce Rest API.

    Check if your user can permission checked by WooCommerce REST API. For example, WooCommerce file class-wc-rest-shipping-zones-controller-base.php checks user permissions via function below, and requires ‘manage_woocommerce’ for ‘shipping_methods’ $object argument value:

    
    /**
     * Check manager permissions on REST API.
     *
     * @since 2.6.0
     * @param string $object  Object.
     * @param string $context Request context.
     * @return bool
     */
    function wc_rest_check_manager_permissions( $object, $context = 'read' ) {
    	$objects = array(
    		'reports'          => 'view_woocommerce_reports',
    		'settings'         => 'manage_woocommerce',
    		'system_status'    => 'manage_woocommerce',
    		'attributes'       => 'manage_product_terms',
    		'shipping_methods' => 'manage_woocommerce',
    		'payment_gateways' => 'manage_woocommerce',
    		'webhooks'         => 'manage_woocommerce',
    	);
    
    	$permission = current_user_can( $objects[ $object ] );
    
    	return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, 0, $object );
    }
    
    Plugin Author Vladimir Garagulya

    (@shinephp)

    Read this article.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Revoke from a role all ‘ure_’ capabilities. It will prohibit editing roles and capabilities, but if user has list_users, promote_users, edit_users, such user will can grant/revoke roles as user admin.

    In order to grant capabilities directly to users (via ‘Capabilities’ link under the user row) currently user should can ‘ure_manage_options’ – superadmin capability for URE plugin.

    URE tries to prevent the accidental revoking capabilities from the administrator role as this role is a superadmin for single site WordPress and user can lose access to the site after revoking critical capabilities from it. It seems you found a way how to make this. Thank you. I will close it with the next update.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    WooCommerce menu is protected by these capabilities:
    WooCommerce edit_others_shop_orders
    Home manage_woocommerce
    Orders edit_shop_orders
    Customers view_woocommerce_reports
    Coupons manage_options
    Reports view_woocommerce_reports
    Settings manage_woocommerce
    Status manage_woocommerce
    Extensions manage_woocommerce

    So when you revoke manage WooCommerce you have to see at least the rest menu items: Orders, Customers, Reports.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    It depends from the capabilities granted to a role and plugins active on website.
    For example WooCommerce redirects to front-end any user if he can not some capabilities, view_admin_dashboard, for example. Read this article for more information about admin dashboard access with active WooCommerce.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    In order to get assistance for Pro version send question to the dedicated forum or contact form at the role-editor.com.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    URE does not include any special support for Elementor.

    URE supports Elementor in the part where Elementor uses WordPress built-in user permissions system: capabilities and roles.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    Please use the dedicated forum at role-editor.com for the questions related to the Pro (paid) version. This forum is for the questions related to the free version only.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    In order to change site presentation webdesigner should can place files to web server file system. Having this access (only via installing new plugins and/or themes) you can get WordPress superadmin privileges in a minute. There is no sense to restrict access of such power user via WordPress user roles.

    You have 2 variants:
    1) If you have some critical data at your site, which you can not show, setup a separate stage copy of website with dummy data and without real users, give to webdesigner full permissions and when he/she will finish work on a design update, transfer updated files to the live site yourself.

    or

    2) Find webdesigner to whom you will trust enough to give access to the real data.

Viewing 15 replies - 406 through 420 (of 3,096 total)