{"action":"created","issue":{"url":"https://api.github.com/repos/terrestris/shogun2/issues/182","repository_url":"https://api.github.com/repos/terrestris/shogun2","labels_url":"https://api.github.com/repos/terrestris/shogun2/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/terrestris/shogun2/issues/182/comments","events_url":"https://api.github.com/repos/terrestris/shogun2/issues/182/events","html_url":"https://github.com/terrestris/shogun2/pull/182","id":151869881,"number":182,"title":"Secure all entities","user":{"login":"buehner","id":3939332,"avatar_url":"https://avatars.githubusercontent.com/u/3939332?v=3","gravatar_id":"","url":"https://api.github.com/users/buehner","html_url":"https://github.com/buehner","followers_url":"https://api.github.com/users/buehner/followers","following_url":"https://api.github.com/users/buehner/following{/other_user}","gists_url":"https://api.github.com/users/buehner/gists{/gist_id}","starred_url":"https://api.github.com/users/buehner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buehner/subscriptions","organizations_url":"https://api.github.com/users/buehner/orgs","repos_url":"https://api.github.com/users/buehner/repos","events_url":"https://api.github.com/users/buehner/events{/privacy}","received_events_url":"https://api.github.com/users/buehner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-29T13:48:24Z","updated_at":"2016-05-02T14:30:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/terrestris/shogun2/pulls/182","html_url":"https://github.com/terrestris/shogun2/pull/182","diff_url":"https://github.com/terrestris/shogun2/pull/182.diff","patch_url":"https://github.com/terrestris/shogun2/pull/182.patch"},"body":"This PR contains a major refactoring of the permission handling:\r\n\r\n* `SecuredPersistentObject` has been removed and its `userPermissions` and `groupPermissions` properties have been moved up to the `PersistentObject` model, which allows us to protect all entities now (based on project specific needs). The services and tests have been adapted according to this change.\r\n* When starting the system in a vanilla state (with `hibernate.hbm2ddl.auto=create`) there will only be one table for all user permissions and one table for all group permissions (of all entities). This is a huge simplification on the database side! Existing projects that can not start in a clean state need a data migration.\r\n* An `AbstractPermissionAwareCrudService` has been introduced and should be extended by ALL services. There is only one expection: `PermissionCollectionService`. Have a look at the release note changes within this PR for details.\r\n* To obtain the previous behaviour of \"unsecured\" objects (that did not extend from the removed class `SecuredPersistentObject`) an `AlwaysAllowReadPermissionEvaluator` has been introduced. By default, this evaluator allows READ access for the following entities (and all their subclasses):\r\n  * `Extent`\r\n  * `InterceptorRule`\r\n  * `LayerAppearance`\r\n  * `LayerDataSource`\r\n  * `Layout`\r\n  * `MapConfig`\r\n  * `MapControl`\r\n  * `Module`\r\n  * `Role`\r\n  * `TileGrid`\r\n  * `Token`\r\n* By default (in the sense of SHOGun2), the following types (and all subclasses) need a set of explicit permissions (previously `SecuredPersistentObject`s):\r\n  * `AbstractLayer`\r\n  * `Application`\r\n  * `File`\r\n  * `Person`\r\n  * `UserGroup`\r\n\r\nPlease review!"},"comment":{"url":"https://api.github.com/repos/terrestris/shogun2/issues/comments/216250748","html_url":"https://github.com/terrestris/shogun2/pull/182#issuecomment-216250748","issue_url":"https://api.github.com/repos/terrestris/shogun2/issues/182","id":216250748,"user":{"login":"buehner","id":3939332,"avatar_url":"https://avatars.githubusercontent.com/u/3939332?v=3","gravatar_id":"","url":"https://api.github.com/users/buehner","html_url":"https://github.com/buehner","followers_url":"https://api.github.com/users/buehner/followers","following_url":"https://api.github.com/users/buehner/following{/other_user}","gists_url":"https://api.github.com/users/buehner/gists{/gist_id}","starred_url":"https://api.github.com/users/buehner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buehner/subscriptions","organizations_url":"https://api.github.com/users/buehner/orgs","repos_url":"https://api.github.com/users/buehner/repos","events_url":"https://api.github.com/users/buehner/events{/privacy}","received_events_url":"https://api.github.com/users/buehner/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T14:30:14Z","updated_at":"2016-05-02T14:30:14Z","body":"We'll do the documentation later. I created a separate issue for this: https://github.com/terrestris/shogun2/issues/183"}}