{"action":"closed","issue":{"url":"https://api.github.com/repos/JoryHogeveen/view-admin-as/issues/88","repository_url":"https://api.github.com/repos/JoryHogeveen/view-admin-as","labels_url":"https://api.github.com/repos/JoryHogeveen/view-admin-as/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/JoryHogeveen/view-admin-as/issues/88/comments","events_url":"https://api.github.com/repos/JoryHogeveen/view-admin-as/issues/88/events","html_url":"https://github.com/JoryHogeveen/view-admin-as/issues/88","id":295712202,"number":88,"title":"Inconsistent check to not render toolbar","user":{"login":"tzkmx","id":11432557,"avatar_url":"https://avatars1.githubusercontent.com/u/11432557?v=4","gravatar_id":"","url":"https://api.github.com/users/tzkmx","html_url":"https://github.com/tzkmx","followers_url":"https://api.github.com/users/tzkmx/followers","following_url":"https://api.github.com/users/tzkmx/following{/other_user}","gists_url":"https://api.github.com/users/tzkmx/gists{/gist_id}","starred_url":"https://api.github.com/users/tzkmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzkmx/subscriptions","organizations_url":"https://api.github.com/users/tzkmx/orgs","repos_url":"https://api.github.com/users/tzkmx/repos","events_url":"https://api.github.com/users/tzkmx/events{/privacy}","received_events_url":"https://api.github.com/users/tzkmx/received_events","type":"User","site_admin":false},"labels":[{"id":310928381,"url":"https://api.github.com/repos/JoryHogeveen/view-admin-as/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"JoryHogeveen","id":826148,"avatar_url":"https://avatars1.githubusercontent.com/u/826148?v=4","gravatar_id":"","url":"https://api.github.com/users/JoryHogeveen","html_url":"https://github.com/JoryHogeveen","followers_url":"https://api.github.com/users/JoryHogeveen/followers","following_url":"https://api.github.com/users/JoryHogeveen/following{/other_user}","gists_url":"https://api.github.com/users/JoryHogeveen/gists{/gist_id}","starred_url":"https://api.github.com/users/JoryHogeveen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoryHogeveen/subscriptions","organizations_url":"https://api.github.com/users/JoryHogeveen/orgs","repos_url":"https://api.github.com/users/JoryHogeveen/repos","events_url":"https://api.github.com/users/JoryHogeveen/events{/privacy}","received_events_url":"https://api.github.com/users/JoryHogeveen/received_events","type":"User","site_admin":false},"assignees":[{"login":"JoryHogeveen","id":826148,"avatar_url":"https://avatars1.githubusercontent.com/u/826148?v=4","gravatar_id":"","url":"https://api.github.com/users/JoryHogeveen","html_url":"https://github.com/JoryHogeveen","followers_url":"https://api.github.com/users/JoryHogeveen/followers","following_url":"https://api.github.com/users/JoryHogeveen/following{/other_user}","gists_url":"https://api.github.com/users/JoryHogeveen/gists{/gist_id}","starred_url":"https://api.github.com/users/JoryHogeveen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoryHogeveen/subscriptions","organizations_url":"https://api.github.com/users/JoryHogeveen/orgs","repos_url":"https://api.github.com/users/JoryHogeveen/repos","events_url":"https://api.github.com/users/JoryHogeveen/events{/privacy}","received_events_url":"https://api.github.com/users/JoryHogeveen/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/JoryHogeveen/view-admin-as/milestones/9","html_url":"https://github.com/JoryHogeveen/view-admin-as/milestone/9","labels_url":"https://api.github.com/repos/JoryHogeveen/view-admin-as/milestones/9/labels","id":2414169,"number":9,"title":"1.8","description":"","creator":{"login":"JoryHogeveen","id":826148,"avatar_url":"https://avatars1.githubusercontent.com/u/826148?v=4","gravatar_id":"","url":"https://api.github.com/users/JoryHogeveen","html_url":"https://github.com/JoryHogeveen","followers_url":"https://api.github.com/users/JoryHogeveen/followers","following_url":"https://api.github.com/users/JoryHogeveen/following{/other_user}","gists_url":"https://api.github.com/users/JoryHogeveen/gists{/gist_id}","starred_url":"https://api.github.com/users/JoryHogeveen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoryHogeveen/subscriptions","organizations_url":"https://api.github.com/users/JoryHogeveen/orgs","repos_url":"https://api.github.com/users/JoryHogeveen/repos","events_url":"https://api.github.com/users/JoryHogeveen/events{/privacy}","received_events_url":"https://api.github.com/users/JoryHogeveen/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":1,"state":"open","created_at":"2017-03-27T16:14:09Z","updated_at":"2018-03-05T15:05:18Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-02-09T00:17:04Z","updated_at":"2018-03-05T15:05:18Z","closed_at":"2018-03-05T15:05:18Z","author_association":"NONE","body":"## Expected Behavior\r\n\r\nIf I check the option \"hide in customizer\", then the toolbar shouldn't be rendered in any customizer view.\r\n\r\n## Actual Behavior\r\n\r\nThe toolbar its shown, but not enqueued the stylesheets. So, all the links and the toolbar are rendered but without the stylesheets and scripts, it becomes useless and polutes the customizer UI (its positioned in front of the Save/Publish/Schedule customization).\r\n\r\n## Conditions in which is observed the bug\r\n\r\nThis behaviour doesn't occur if the user accesing the customizer has the `edit_theme_options`.\r\n\r\nHowever it happend if the user accesing the customizer has a different capability.\r\n\r\n[I've added a filter to `user_has_cap` used by the customize.php script](https://gist.github.com/tzkmx/25bb4146eee867979499380e6416ef3e/7d0c5aadc96a1086a2d461580a0fd8d88ca94141#file-allow-customize-just-specific-php) to grant access to the UI, that allows the user use the panels, sections and controls granted to them role, but not to the whole set of features allowed by `edit_theme_options`.\r\n\r\n\r\n## Specifications\r\n\r\n  - Plugin Version: 1.7.6\r\n  - WordPress Version: 4.9.4\r\n  - Other plugins installed: Plenty, but just that filter seems to be the culprit.\r\n  - Theme: jarida\r\n  - Browser: Firefox 58 and Chrome 63\r\n\r\n## Proposed fix\r\n\r\nI've replicated the check done in [VAA_View_Admin_As_UI::enqueue_scripts](https://github.com/JoryHogeveen/view-admin-as/blob/b8b2dedab2d6bf3d5709432ceeedefc87904e16d/ui/class-ui.php#L281-L283) to the beginning of methods `VAA_View_Admin_As_Admin_Ba::__construct()` and `VAA_View_Admin_As_Toolbar::vaa_toolbar_init()` and then the toolbar is not rendered.\r\n"}}
{"actor":{"display_login":"JoryHogeveen"}}