GitHub user prabhjyotsingh opened a pull request:
https://github.com/apache/zeppelin/pull/3004
[ZEPPELIN-2913] Support for both user and role for AuthorizationFilter
### What is this PR for?
Currently, Zeppelin only supports roles for AuthorizationFilter, but there
can be a condition as described in
https://issues.apache.org/jira/browse/ZEPPELIN-2913 where Zeppelin's user does
not belong to a group/role, and the administrator wants to have control using
user only.
### What type of PR is it?
[Feature]
### Todos
* [ ] - Add documentation
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-2913
### How should this be tested?
add the following in shiro.ini:
```
[main]
...
anyofroles = org.apache.zeppelin.utils.AnyOfRolesUserAuthorizationFilter
[urls]
...
/api/interpreter/** = authc, anyofroles[admin, user1]
/api/configurations/** = authc, roles[admin]
/api/credential/** = authc, roles[admin]
```
With the above config both user (user1) and users the belong to role admin
will have access to interpreter setting page.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/prabhjyotsingh/zeppelin ZEPPELIN-2913
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/3004.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 #3004
----
commit 53c0c034a3e76467929091442a8a9c8b3c9839cf
Author: Prabhjyot Singh <prabhjyotsingh@...>
Date: 2018-06-05T08:14:33Z
[ZEPPELIN-2913] support for both user and role
Change-Id: I5a83e5701d22ac40b37cc8c3d4c9414ef007b99c
----
---