Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jwright006

    (@jwright006)

    Hello –

    Thanks for the offer to provide a custom plugin; I have already removed the chunk of code necessary for me to have the desired behavior, so I am good to go for now.

    Unfortunately I likely will be investigating an alternate solution due to the limitation I have described, but I appreciate your quick replies and support.

    Thanks,
    Justin

    Thread Starter jwright006

    (@jwright006)

    Thank you for the quick reply.

    I understand the desire to have the shop manager be able to edit the settings for the plugin… however with the current way this is implemented, the solution to re-enable the “manage_options” permission for Shop Manager impacts the rights of Shop Manager for the entire Woo Commerce application, which has a much too broad impact in my opinion.

    As noted here: https://codex.ww.wp.xz.cn/Roles_and_Capabilities#manage_options the manage_options role allows access to many administrative panels – most of which are inappropriate for what the “shop manager” role was originally intended for – manage the shop without giving them admin access ( https://docs.woocommerce.com/document/roles-capabilities/ ).

    If I may suggest, I don’t think any plugin should modify roles/permissions – I think the functionality you describe should either be removed or re-implemented in a way where the plugin does not change permissions for a user for which the impact is greater than the specific plugin.

    Thanks,
    Justin

    Thread Starter jwright006

    (@jwright006)

    A bit more info… it seems this was added purposely in 2.2 via the following code:

    /** 
      * Capability to allow shop manager to edit settings
      * 
      * @hook admin_init
      * @since 2.2
    */
    function orddd_lite_capabilities() {
        $role = get_role( 'shop_manager' );
        if( '' != $role ) {
          $role->add_cap( 'manage_options' );
        }
    }

    It seems to me the intent of the above was to enable the Shop Manager role to be able to adjust the delivery date settings, however rather than honor the Shop Manager role it instead modifies the permissions of the role itself, which of course has implications much broader than just this plugin.

    I think it would be best of a plugin doesn’t modify ( especially upgrade ) the permissions associated with a role. Could this capability be re-assessed?

    Thanks again,
    Justin

    • This reply was modified 8 years ago by jwright006.
Viewing 3 replies - 1 through 3 (of 3 total)