Support » Plugin: User Access Manager » Users can see all pages with certain ACF call

  • I’m having an issue with User Access Manager (UAM) and Advanced Custom Fields Pro (ACF). This is probably one of those things where ACF will tell me to check with UAM and UAM will tell me to check with ACF, but here goes anyway.

    I’m using ACF Pro to create an options page via acf_add_options_page(). I’m using this for a bunch of options throughout my theme, but the main one I’m having an issue with is to turn on or off CPTs in the admin menu. In my theme options page I have a set of checkboxes for the different CPTs that a user can turn on or off.

    Whenever I try to use get_field(‘my_options_page_variable’, ‘option’) in the admin_menu action it breaks some of the permissions put in place by the UAM plugin. Users can now see all the pages in the Pages section instead of just the ones they can edit in their group. The good news is that if they try to edit one of the pages they shouldn’t be seeing, the permission level is still intact, and will tell them that “You have no rights to access this content.” If I comment it out this line the UAM stuff works fine. I’ve used the get_field(‘____’, ‘option’) in other actions like wp_head without issue.

    Has anyone run into issues where Advanced Custom Fields or other plugins break part of UAM’s ability to hide posts/pages that should be restricted? Or does anyone know if ACF’s get_field(‘____’, ‘options’) invokes or add some sort of permissions level on the current user that could be causing the conflict? I tried echoing wp_get_current_user() before and after commenting out the get_field(‘_____’, ‘options’) call and the user permissions look the same.

  • The topic ‘Users can see all pages with certain ACF call’ is closed to new replies.