Security

How to show different views by the type of user

New Member

Hello everyone:
My idea is: There are three types of users, I would like to show different views who the the types of user .
Can this do with Splunk?

Tags (2)
0 Karma

Motivator

Hi
try this

 index=_internal  | rex "\/app\/(?<myApp>\w+)\/(?<myView>\w+)\"" | stats  values(myView) AS myViews by user 
0 Karma

New Member

thanks for you help,that should be good.I will be try!

0 Karma

Revered Legend

One option could be to create 3 roles for your 3 user types. In your app, create three views, one for each user type and then set the sharing permission of each view to grant Read permission to specific role only. The limitation of this approach is that you can't set these views as default view for user. This works fine if they are present in the navigation menu.

0 Karma

Communicator

As Martin Müller said ...

You can use Javascript to find out which user/role a user have and you can manage your views/content depending on that user :

http://answers.splunk.com/answers/91302/getting-user-role-in-javascript

There are several mechanisms to control the content depending on user/roles ...

eg. (http)redirect to (static)views, change (some) content within a view using JQuery, using Ajax to load entire content in panels, ...

0 Karma

Legend

Sure. Create a role for each type of user, then create three different apps and set them as the defaults for the respective user role. Then you're free to customize each app for each user type.

0 Karma

SplunkTrust
SplunkTrust
0 Karma

New Member

Yes,but i was not found the doc of SplunkJS/Webframework

0 Karma

SplunkTrust
SplunkTrust

You could build one default view for everyone, and use SplunkJS/Webframework code or SideviewUtils' Multiplexer module to show/hide parts of the view depending on the current user's role.

0 Karma

Legend

No, you can't set different views as default for different users within an app.

0 Karma

New Member

Dear friend:
This is not what i want, i mean just have one app, not more.
but thanks your answer!

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!