Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Joachim Jensen

    (@intoxstudio)

    Thank you for reporting this, it clearly sounds like a bug and I will look into it as soon as possible.

    Got the same problem, if user role admin is activ you will be able to access orders from “my account” all other user role show “Invalid order”.
    Is there a way to solve problem by editing access rules?
    otherwise love the plugin and love to rate *****, but this is a bug that needs solved.

    Plugin Author Joachim Jensen

    (@intoxstudio)

    This is a top priority for this plugin, unfortunately I have not yet had time to look into it, but I will try to make time for it next week.

    It will help a lot if you can give a step-by-step guide on how I can reproduce the error, eg. does it only appear for specific access levels, only if the ordered products have been restricted etc?

    Hi Joachim,
    check this: woocommerce installed, place order from any user role, if customer checks “my account” in woocommerce (front-end) as user-role admin he will be able to press orders -> view and can see his order.
    You change user role to any other role request “view” will get you “Invalid order”. I did not change any access levels either for products nor users.
    Obviously your plugin denies somehow access to certain links if not user role administrator.
    Tried to override problem by giving user admin role and restricct access, so user has admin rights restricted to what he would be as user role f.e. customer – wont work.
    Same problem arises in combination with Ultimate Member plugin, certain links will only work with user role admin.
    Hope description helps to solve problem more easy – good luck – looking forwards to use your plugin!

    sorry, did not check with Ultimate Member plugin, but with “User Role Editor”

    Plugin Author Joachim Jensen

    (@intoxstudio)

    Thanks for the detailed description. I found the cause of the problem.

    This plugin has a lightweight capability manager that makes you grant/deny specific capabilities for user levels.
    When WordPress checks if a user has a specific capability, this plugin will use a socalled filter to “overwrite” it with the one from the user’s level (if present). This happens for each capability, and they are then cached for the user.

    The cache makes this mechanism much more performant, but in this case, it would “discard” some changes that other plugins would add to the filter.

    This will be fixed in the next release. If you want to fix it now and also test with User Role Editor, go to /plugins/restrict-user-access/level.php line 90 and replace the code with:

    add_filter( 'user_has_cap',
    	array($this,"user_level_has_cap"), 9, 3 );

    Let me know if this works for you.

    Plugin Author Joachim Jensen

    (@intoxstudio)

    Also, administrators on a site will per default have access to everything no matter what user levels exist on your site. This is done to prevent accidental “lockouts”, but can be configured with add_filter('rua/user/global-access', function($has_access, $user) {});

    Plugin Author Joachim Jensen

    (@intoxstudio)

    This has been fixed in version 0.12.

    Hi Joachim,
    thanks for fixing the small bug, great job!
    be proud of yourself!
    I rated 5 star!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Users cannot access orders from my account’ is closed to new replies.