Hi,
I have an app with some views/dashboards, and the right to access each view is owned by a specific role :
metadata/default.meta
[views/view1]
access = read : [ admin, access_to_view1 ], write : [ admin ]
export = none
owner = admin
...
The set of dashboards a specific (non-admin) user can see and access is defined through the list of roles given to this user. For example, user "jim" could have the roles access_to_view1
and access_to_view3
in order to see the dashboards view1
and view3
, but not view2
.
My problem is that any user without access_to_view1
is effectively blocked out of the app, since upon login she is redirected to the default home page which is view1
for the app, and Splunk returns a 404 since this user doesn't have the right to access this dashboard.
default/data/ui/nav/default.xml
<nav search_view="search">
<view name="view1" default="true"/>
<view name="view2"/>
<view name="view3"/>
</nav>
The problem is still there if I remove the default="true"
part ; I think the default home page is the first view in the list in this case anyway.
How can I manage to have an app in which some users do not have read access to the default home page?
I solved the problem by using dynamic view lists in the navigation file (http://dev.splunk.com/view/SP-CAAAEP9#lists).
default/data/ui/nav/default.xml
<nav search_view="search">
<view source="all" match="view"/>
</nav>
This will take the available views for the current user and display them. Splunk will not try to display links to views the current user doesn't have rights for, so no error.
I took care to have the name of the views (the file name) ordered in the order I need them to display (ie. view1
, view2
etc. instead of something like view_summary
, view_problems
etc.).
I solved the problem by using dynamic view lists in the navigation file (http://dev.splunk.com/view/SP-CAAAEP9#lists).
default/data/ui/nav/default.xml
<nav search_view="search">
<view source="all" match="view"/>
</nav>
This will take the available views for the current user and display them. Splunk will not try to display links to views the current user doesn't have rights for, so no error.
I took care to have the name of the views (the file name) ordered in the order I need them to display (ie. view1
, view2
etc. instead of something like view_summary
, view_problems
etc.).