GitHub user soralee reopened a pull request: https://github.com/apache/zeppelin/pull/2239
Show dialog if owners field set to be empty on shiro ### What is this PR for? This PR is for a showing dialog when note's permission set `Readers/Writers` but `Owners` is empty. Currently, after merged #849, if user set `Owners` is empty, it's automatically set as the current user. So, It would be better to show a dialog before `Owners` is fill with the current user because user might think it is not intended. Plus, if a user only set `Readers` role, all field(`Writers` and `Owners`) role is filled as the current user like below. It's not necessary to our because the `Owner` role can read and write note. ![not_need_wirters](https://cloud.githubusercontent.com/assets/8110458/24869746/2a77d2da-1e4f-11e7-86a5-794e1aac02d0.gif) ### What type of PR is it? [ Improvement ] ### What is the Jira issue? * [ZEPPELIN-2206; Be added a writer account when adding a reader account on Shiro](https://issues.apache.org/jira/browse/ZEPPELIN-2206) * [ZEPPELIN-2418; show dialog if user set to the empty owner permission](https://issues.apache.org/jira/browse/ZEPPELIN-2418) ### How should this be tested? 1. Turn on shiro. 2. Set permission `Writers` and `Readers` except `Owner` role. 3. Check the dialog appears ### Screenshots (if appropriate) [Before] * Set `Readers` and `Writers` except `Owners` ![zeppelin-2206_auto_shiro_b_1](https://cloud.githubusercontent.com/assets/8110458/24869964/cf382676-1e4f-11e7-8e95-30c149a4aba5.gif) * Set only 'Writers` ![zeppelin-2206_auto_shiro_b_2](https://cloud.githubusercontent.com/assets/8110458/24870112/3821f518-1e50-11e7-9310-fcafd4e26376.gif) * set only `Readers`; this screen is attached above. [After] * Set `Readers` and `Writers` except `Owners` ( Set only `Writers`; this result is same) ![zeppelin-2206_auto_shiro_a_1](https://cloud.githubusercontent.com/assets/8110458/24870781/61d8f1c0-1e52-11e7-8faa-38ff4fd64f6f.gif) * Set only 'Readers` ![zeppelin-2206_auto_shiro_a_2](https://cloud.githubusercontent.com/assets/8110458/24870811/76f547ca-1e52-11e7-98b2-f6a5541284ab.gif) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No You can merge this pull request into a Git repository by running: $ git pull https://github.com/soralee/zeppelin ZEPPELIN-2206_auto_shiro Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/2239.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2239 ---- commit af4ff29be8a20f597670e7610305d5956243ac2e Author: soralee <sora0...@zepl.com> Date: 2017-04-10T09:54:25Z rebase master and revert notebookRestApi commit 047029944014c606f25df6b0c3b4fe82a394caca Author: soralee <sora0...@zepl.com> Date: 2017-04-20T05:05:07Z modify title of dialogs commit 3913e00f07a3bfeae802043dcbb93857d6c6ab14 Author: soralee <sora0...@zepl.com> Date: 2017-04-20T06:05:59Z rebase notebook.controller commit 783fd948a4dc87d07fb581a957fb9933fb504542 Author: soralee <sora0...@zepl.com> Date: 2017-04-20T08:34:15Z add to check whitespace commit 5ed8b26c47859a01286f1dbf40b11008916a06dc Author: soralee <sora0...@zepl.com> Date: 2017-04-20T09:03:51Z add to check whitespace commit ea274830bbf0dd81389c99f20630565f3feefec4 Author: soralee <sora0...@zepl.com> Date: 2017-04-20T09:24:10Z add if statement for checking whitespace ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---