• Resolved michalecpp

    (@michalecpp)


    When I am trying to login as an Administrator then everything is ok, but
    when I am trying to login as a Subscriber then an error as below appears.
    The problem only occurs when logging in. If I go to the home page, everything works there.

    View post on imgur.com

    Is it ‘my side’ error?

    • This topic was modified 3 years, 10 months ago by michalecpp.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • NO, I just had it when I was migrating a website.

    if ( ! current_user_can( ADMIN_ROLE ) ) {
         throw new Exception( 'You don\'t have permission' );
    }

    change this code to this to fix the issue temp.

    if ( ! current_user_can( 'manage_options' ) ) {
         throw new Exception( 'You don\'t have permission' );
    }

    The plugin needs to properly use current_user_can function not with the role name but with capabilities.

    Thread Starter michalecpp

    (@michalecpp)

    Same thing, nothing changed. It does not work in my case. Did I do something wrong?

    View post on imgur.com

    • This reply was modified 3 years, 10 months ago by michalecpp.
    Thread Starter michalecpp

    (@michalecpp)

    Support just resolved this problem. I did an upgrade to 4.0.4 version and now is fine. Thanks for a help.

    • This reply was modified 3 years, 10 months ago by michalecpp.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error: Uncaught Exception: You don’t have permission in’ is closed to new replies.