Dashboards & Visualizations

User without rights to access default home page

manur
Explorer

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_view3in 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?

0 Karma
1 Solution

manur
Explorer

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.).

View solution in original post

0 Karma

manur
Explorer

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.).

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...