{"action":"created","issue":{"url":"https://api.github.com/repos/swcarpentry/amy/issues/472","labels_url":"https://api.github.com/repos/swcarpentry/amy/issues/472/labels{/name}","comments_url":"https://api.github.com/repos/swcarpentry/amy/issues/472/comments","events_url":"https://api.github.com/repos/swcarpentry/amy/issues/472/events","html_url":"https://github.com/swcarpentry/amy/pull/472","id":103097767,"number":472,"title":"Permissions","user":{"login":"pbanaszkiewicz","id":72821,"avatar_url":"https://avatars.githubusercontent.com/u/72821?v=3","gravatar_id":"","url":"https://api.github.com/users/pbanaszkiewicz","html_url":"https://github.com/pbanaszkiewicz","followers_url":"https://api.github.com/users/pbanaszkiewicz/followers","following_url":"https://api.github.com/users/pbanaszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/pbanaszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/pbanaszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbanaszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/pbanaszkiewicz/orgs","repos_url":"https://api.github.com/users/pbanaszkiewicz/repos","events_url":"https://api.github.com/users/pbanaszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/pbanaszkiewicz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swcarpentry/amy/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"gvwilson","id":911566,"avatar_url":"https://avatars.githubusercontent.com/u/911566?v=3","gravatar_id":"","url":"https://api.github.com/users/gvwilson","html_url":"https://github.com/gvwilson","followers_url":"https://api.github.com/users/gvwilson/followers","following_url":"https://api.github.com/users/gvwilson/following{/other_user}","gists_url":"https://api.github.com/users/gvwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/gvwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvwilson/subscriptions","organizations_url":"https://api.github.com/users/gvwilson/orgs","repos_url":"https://api.github.com/users/gvwilson/repos","events_url":"https://api.github.com/users/gvwilson/events{/privacy}","received_events_url":"https://api.github.com/users/gvwilson/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/swcarpentry/amy/milestones/9","html_url":"https://github.com/swcarpentry/amy/milestones/v0.9","labels_url":"https://api.github.com/repos/swcarpentry/amy/milestones/9/labels","id":1253802,"number":9,"title":"v0.9","description":"* URL normalization fixes\r\n* permissions (ie. read only access for the Steering Committee)\r\n* workshop requests\r\n* instructor profile updates","creator":{"login":"pbanaszkiewicz","id":72821,"avatar_url":"https://avatars.githubusercontent.com/u/72821?v=3","gravatar_id":"","url":"https://api.github.com/users/pbanaszkiewicz","html_url":"https://github.com/pbanaszkiewicz","followers_url":"https://api.github.com/users/pbanaszkiewicz/followers","following_url":"https://api.github.com/users/pbanaszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/pbanaszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/pbanaszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbanaszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/pbanaszkiewicz/orgs","repos_url":"https://api.github.com/users/pbanaszkiewicz/repos","events_url":"https://api.github.com/users/pbanaszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/pbanaszkiewicz/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":6,"state":"open","created_at":"2015-08-13T15:31:22Z","updated_at":"2015-09-01T11:44:08Z","due_on":"2015-08-30T22:00:00Z","closed_at":null},"comments":8,"created_at":"2015-08-25T19:25:49Z","updated_at":"2015-09-02T08:04:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/swcarpentry/amy/pulls/472","html_url":"https://github.com/swcarpentry/amy/pull/472","diff_url":"https://github.com/swcarpentry/amy/pull/472.diff","patch_url":"https://github.com/swcarpentry/amy/pull/472.patch"},"body":"This PR implements #464.\r\n\r\nWork so far:\r\n* setting `@permission_required` decorator (in various forms) for all non-read-only views (for example `delete_host` or `person_add`)\r\n* hiding elements of UI for users without specific permissions\r\n\r\nSo in order to give someone a read-only access to AMY, all we have to do is to enable them to log in.\r\n\r\nIf we want to have someone as an administrator (like Maneesha or Giacomo), we can either set them as superuser (that's how it's done now) or explicitly select all specific permissions for them.\r\n\r\nThings to consider:\r\n* adding permission groups 'administrator', 'steering committee'\r\n* adding a 'can_login' field to `Person`\r\n\r\nThe permission groups may be just a more verbose way so say that someone belongs to administrators or steering committee.\r\n\r\nThe `person.can_login` would indicate that someone may be able to log into AMY – right now we kind of don't see that. It's related to `person.is_password_usable() == False`, but it's not possible to any admin to, for example, disable login for someone.\r\n\r\n@gvwilson any thoughts?"},"comment":{"url":"https://api.github.com/repos/swcarpentry/amy/issues/comments/136970654","html_url":"https://github.com/swcarpentry/amy/pull/472#issuecomment-136970654","issue_url":"https://api.github.com/repos/swcarpentry/amy/issues/472","id":136970654,"user":{"login":"gvwilson","id":911566,"avatar_url":"https://avatars.githubusercontent.com/u/911566?v=3","gravatar_id":"","url":"https://api.github.com/users/gvwilson","html_url":"https://github.com/gvwilson","followers_url":"https://api.github.com/users/gvwilson/followers","following_url":"https://api.github.com/users/gvwilson/following{/other_user}","gists_url":"https://api.github.com/users/gvwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/gvwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvwilson/subscriptions","organizations_url":"https://api.github.com/users/gvwilson/orgs","repos_url":"https://api.github.com/users/gvwilson/repos","events_url":"https://api.github.com/users/gvwilson/events{/privacy}","received_events_url":"https://api.github.com/users/gvwilson/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T08:04:18Z","updated_at":"2015-09-02T08:04:18Z","body":"Back to @pbanaszkiewicz "}}