{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1131","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1131/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1131/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1131/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/1131","id":57446593,"number":1131,"title":"Managing fine grain rights on entities/resources","user":{"login":"gmarziou","id":361007,"avatar_url":"https://avatars.githubusercontent.com/u/361007?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarziou","html_url":"https://github.com/gmarziou","followers_url":"https://api.github.com/users/gmarziou/followers","following_url":"https://api.github.com/users/gmarziou/following{/other_user}","gists_url":"https://api.github.com/users/gmarziou/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarziou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarziou/subscriptions","organizations_url":"https://api.github.com/users/gmarziou/orgs","repos_url":"https://api.github.com/users/gmarziou/repos","events_url":"https://api.github.com/users/gmarziou/events{/privacy}","received_events_url":"https://api.github.com/users/gmarziou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-12T11:10:06Z","updated_at":"2015-02-12T22:34:04Z","closed_at":null,"body":"The entity generator exposes the whole entity through a resource, this works fine in simple cases but it's not enough as soon as you want to filter data based on user's roles or when a field update is conditioned by business logic. This is why in JHipster there is a UserDto and User entity.\r\n\r\nDocumentation could help by giving some guidelines like using DTOs, adding business logic to services or controllers, using JsonView, ... I can only think of solutions involving hand coding but may there are also some declarative approaches that I don't know.\r\n\r\nAnyway if this requires hand coding, do you think that the generator could help here to promote some practices by generating extra code?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/74168121","html_url":"https://github.com/jhipster/generator-jhipster/issues/1131#issuecomment-74168121","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1131","id":74168121,"user":{"login":"gmarziou","id":361007,"avatar_url":"https://avatars.githubusercontent.com/u/361007?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarziou","html_url":"https://github.com/gmarziou","followers_url":"https://api.github.com/users/gmarziou/followers","following_url":"https://api.github.com/users/gmarziou/following{/other_user}","gists_url":"https://api.github.com/users/gmarziou/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarziou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarziou/subscriptions","organizations_url":"https://api.github.com/users/gmarziou/orgs","repos_url":"https://api.github.com/users/gmarziou/repos","events_url":"https://api.github.com/users/gmarziou/events{/privacy}","received_events_url":"https://api.github.com/users/gmarziou/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T22:34:04Z","updated_at":"2015-02-12T22:34:04Z","body":"I'll go through this process in following weeks in my current project so I'll try to clarify my thoughts on this and share."}}