• Resolved hebhansen

    (@hebhansen)


    Hi

    Userroles that are not admin, have access to complianz settings backend. I have members plugin installed, but I cannot locate this setting. Any advice? And how can I make it only visible to admin / super admin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support leonardoiub

    (@leonardotamion)

    Hello,

    thanks for your message.

    At the moment we don’t have the possibility to show/not show the Complianz settings based on user roles, we’ve already reported it to the dev team but we don’t have a timeline on when this feature will be considered.

    Thanks for your feedback though, we’ll report it internally too.

    Thread Starter hebhansen

    (@hebhansen)

    Thx for your reply.

    Maybe rely on members to do this forst hand. It needs that hook in members though, to do this.

    Do you have a php snippet that would do this?

    • This reply was modified 1 month ago by hebhansen.
    Thread Starter hebhansen

    (@hebhansen)

    To whom it may concern… This snippet will remove complianz from dashboard for other than admin:

    function restrict_complianz_menu_to_admin() {
    // Check if the current user is an administrator
    if (!current_user_can('administrator')) {
    remove_menu_page('complianz'); // Remove Complianz from the menu for non-admins
    }
    }
    add_action('admin_menu', 'restrict_complianz_menu_to_admin', 999);

    Have a nice weekend

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.