{"action":"created","issue":{"url":"https://api.github.com/repos/dpla/primary-source-sets/issues/76","labels_url":"https://api.github.com/repos/dpla/primary-source-sets/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/dpla/primary-source-sets/issues/76/comments","events_url":"https://api.github.com/repos/dpla/primary-source-sets/issues/76/events","html_url":"https://github.com/dpla/primary-source-sets/pull/76","id":120050080,"number":76,"title":"Allow admins to designate and view unpublished sets","user":{"login":"AudreyAltman","id":3615206,"avatar_url":"https://avatars.githubusercontent.com/u/3615206?v=3","gravatar_id":"","url":"https://api.github.com/users/AudreyAltman","html_url":"https://github.com/AudreyAltman","followers_url":"https://api.github.com/users/AudreyAltman/followers","following_url":"https://api.github.com/users/AudreyAltman/following{/other_user}","gists_url":"https://api.github.com/users/AudreyAltman/gists{/gist_id}","starred_url":"https://api.github.com/users/AudreyAltman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AudreyAltman/subscriptions","organizations_url":"https://api.github.com/users/AudreyAltman/orgs","repos_url":"https://api.github.com/users/AudreyAltman/repos","events_url":"https://api.github.com/users/AudreyAltman/events{/privacy}","received_events_url":"https://api.github.com/users/AudreyAltman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"markbreedlove","id":5550828,"avatar_url":"https://avatars.githubusercontent.com/u/5550828?v=3","gravatar_id":"","url":"https://api.github.com/users/markbreedlove","html_url":"https://github.com/markbreedlove","followers_url":"https://api.github.com/users/markbreedlove/followers","following_url":"https://api.github.com/users/markbreedlove/following{/other_user}","gists_url":"https://api.github.com/users/markbreedlove/gists{/gist_id}","starred_url":"https://api.github.com/users/markbreedlove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markbreedlove/subscriptions","organizations_url":"https://api.github.com/users/markbreedlove/orgs","repos_url":"https://api.github.com/users/markbreedlove/repos","events_url":"https://api.github.com/users/markbreedlove/events{/privacy}","received_events_url":"https://api.github.com/users/markbreedlove/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-12-02T22:27:03Z","updated_at":"2015-12-10T18:32:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dpla/primary-source-sets/pulls/76","html_url":"https://github.com/dpla/primary-source-sets/pull/76","diff_url":"https://github.com/dpla/primary-source-sets/pull/76.diff","patch_url":"https://github.com/dpla/primary-source-sets/pull/76.patch"},"body":"This allows admins to assert whether or not `source_sets` are \"published\".  Published sets are visible to all users from `source_sets#index`; unpublished sets are visible only to admins.  The `source_sets` table has a column, `published`, that takes a boolean value.  Up to this point, the default has been to set all `source_sets` as `published=true` in the database.\r\n\r\nChanges include:\r\n* A place on the `source_sets` form to specify whether a set is \"published\" or not.\r\n* Model methods that get published and unpublished sets from the database.\r\n* Setting instance variables in the `source_sets#index` controller for `@published_sets` and `@unpublished_sets`.\r\n* Abstracting out a view partial that renders a list of sets, be they published or unpublished.\r\n* Changing the `source_sets#index` view to show unpublished sets only to admins.\r\n\r\nThis PR purposely leaves all sets visible to all users when accessed directly with the URL.  This will allow members of the EAC to view unpublished sets before we build out the authentication system to create view-only access (see [task #8163](https://issues.dp.la/issues/8163)).\r\n\r\nIf you view `source_sets#index` in your browser, you will notice that the unpublished sets have a different background color than the sets.  This is intentional.\r\n\r\nThis addresses [task #8102](https://issues.dp.la/issues/8102)."},"comment":{"url":"https://api.github.com/repos/dpla/primary-source-sets/issues/comments/163711145","html_url":"https://github.com/dpla/primary-source-sets/pull/76#issuecomment-163711145","issue_url":"https://api.github.com/repos/dpla/primary-source-sets/issues/76","id":163711145,"user":{"login":"no-reply","id":1361776,"avatar_url":"https://avatars.githubusercontent.com/u/1361776?v=3","gravatar_id":"","url":"https://api.github.com/users/no-reply","html_url":"https://github.com/no-reply","followers_url":"https://api.github.com/users/no-reply/followers","following_url":"https://api.github.com/users/no-reply/following{/other_user}","gists_url":"https://api.github.com/users/no-reply/gists{/gist_id}","starred_url":"https://api.github.com/users/no-reply/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/no-reply/subscriptions","organizations_url":"https://api.github.com/users/no-reply/orgs","repos_url":"https://api.github.com/users/no-reply/repos","events_url":"https://api.github.com/users/no-reply/events{/privacy}","received_events_url":"https://api.github.com/users/no-reply/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T18:32:58Z","updated_at":"2015-12-10T18:32:58Z","body":"This looks rock solid to me. Nice, clean, well tested code. :+1: "}}