{"action":"created","issue":{"url":"https://api.github.com/repos/alexweissman/UserFrosting/issues/209","labels_url":"https://api.github.com/repos/alexweissman/UserFrosting/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/alexweissman/UserFrosting/issues/209/comments","events_url":"https://api.github.com/repos/alexweissman/UserFrosting/issues/209/events","html_url":"https://github.com/alexweissman/UserFrosting/issues/209","id":55382708,"number":209,"title":"Hide add button if user does not have certain permission?","user":{"login":"Forge-Media","id":7041755,"avatar_url":"https://avatars.githubusercontent.com/u/7041755?v=3","gravatar_id":"","url":"https://api.github.com/users/Forge-Media","html_url":"https://github.com/Forge-Media","followers_url":"https://api.github.com/users/Forge-Media/followers","following_url":"https://api.github.com/users/Forge-Media/following{/other_user}","gists_url":"https://api.github.com/users/Forge-Media/gists{/gist_id}","starred_url":"https://api.github.com/users/Forge-Media/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Forge-Media/subscriptions","organizations_url":"https://api.github.com/users/Forge-Media/orgs","repos_url":"https://api.github.com/users/Forge-Media/repos","events_url":"https://api.github.com/users/Forge-Media/events{/privacy}","received_events_url":"https://api.github.com/users/Forge-Media/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alexweissman/UserFrosting/labels/features%20-%20access%20control","name":"features - access control","color":"009800"},{"url":"https://api.github.com/repos/alexweissman/UserFrosting/labels/use%20and%20extension","name":"use and extension","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-24T19:53:23Z","updated_at":"2015-05-20T22:49:30Z","closed_at":"2015-05-20T22:49:30Z","body":"Hi, me again ;)\r\n\r\nBefore I push my app, ForgeCP first Beta I would like to try and hide a button.\r\n\r\n* When a user (Client) logs in, the Dashboard page (Atoms) displays a table with **only** their Atoms (VPSs).\r\n![ForgeCP Clients](http://i.imgur.com/SaT2t8u.png)\r\n\r\n* When a root user  logs in, the Dashboard page (Atoms) displays a table with all Atoms. \r\n![ForgeCP Admin](http://i.imgur.com/Qck02b2.png)\r\n\r\nThe issue is that these tables are the same, and an if statement simply checks whether a user is an admin and if so calls a function to list AllAtoms else list UserAtoms.\r\n\r\nHowever, the add Atom Button is visible to both admins and users. However, if a user clicks it a permissions error appears. **Is it possible to hide this button if a user is not an admin?**\r\n"},"comment":{"url":"https://api.github.com/repos/alexweissman/UserFrosting/issues/comments/104065434","html_url":"https://github.com/alexweissman/UserFrosting/issues/209#issuecomment-104065434","issue_url":"https://api.github.com/repos/alexweissman/UserFrosting/issues/209","id":104065434,"user":{"login":"alexweissman","id":5004534,"avatar_url":"https://avatars.githubusercontent.com/u/5004534?v=3","gravatar_id":"","url":"https://api.github.com/users/alexweissman","html_url":"https://github.com/alexweissman","followers_url":"https://api.github.com/users/alexweissman/followers","following_url":"https://api.github.com/users/alexweissman/following{/other_user}","gists_url":"https://api.github.com/users/alexweissman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexweissman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexweissman/subscriptions","organizations_url":"https://api.github.com/users/alexweissman/orgs","repos_url":"https://api.github.com/users/alexweissman/repos","events_url":"https://api.github.com/users/alexweissman/events{/privacy}","received_events_url":"https://api.github.com/users/alexweissman/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T22:49:30Z","updated_at":"2015-05-20T22:49:30Z","body":"Let me know if you have any more problems!"}}