GitHub user AhyoungRyu opened a pull request:

    https://github.com/apache/zeppelin/pull/1060

    [MINOR] [ZEPPELIN-1043] Blocked in inaccessible notebook with blank page

    ### What is this PR for?
    Currently, when a user who doesn't have a permission for a notebook is 
trying to access to the notebook, a dialog is shown up. The user can login in 
this dialog or close it.
    But if the user is trying to just close this dialog, the location is not 
changed and still stay `/notebook/NOTE_ID` with blank page. So the user have to 
click somewhere manually. 
    
    So I just added `$window.history.back()` so that it can go back to previous 
page.
    See the attached gif image :)
    
    ### What type of PR is it?
    Bug Fix
    
    ### Todos
    
    ### What is the Jira issue?
    [ZEPPELIN-1043](https://issues.apache.org/jira/browse/ZEPPELIN-1043)
    
    ### How should this be tested?
    1. Apply this patch and activate shiro -> login with `admin`
    2. Create a notebook and set a note permission (just fill  all 3 fields 
with `admin`)
    3. Logout with `admin` and login with `user1` 
    4. Try to access to the notebook -> a popup will be shown
    5. Click `Cancel` -> Page will redirect to your previous location (home or 
the previous notebook page)
    
    ### Screenshots (if appropriate)
    - Before
    
![before](https://cloud.githubusercontent.com/assets/10060731/16245851/96bd5674-37b7-11e6-9f9e-c69b74b0e6cc.gif)
    
    - After
    When you were in home
    
![after1](https://cloud.githubusercontent.com/assets/10060731/16245854/9a16fc30-37b7-11e6-80d3-b7bae18c78b2.gif)
    When you were in the other notebook 
    
![after2](https://cloud.githubusercontent.com/assets/10060731/16245855/9c0da7a0-37b7-11e6-8e07-470be0d18fa2.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/AhyoungRyu/incubator-zeppelin ZEPPELIN-1043

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1060.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 #1060
    
----

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to