Bulk edit users?

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Bulk edit users?

Post by vAJ »

Hey folks. Wish I had the time to stop by the office last week when I was in town, but my schedule was booked.

Running into an issue with permissions in NLS 2.0.4. When users are getting alerts, the link to show the alert data will take them to the default screen if they don't have "Alert - View" permissions. So now I need to edit a bunch of users... and I do mean a bunch. Not very conducive to have to edit each user manually. Any way to grant a permission on the backend or can we put in a feature request to have this bulk ability in the UI?

Thanks,
AndrewJ
Andrew J. - Do you even grok?
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Bulk edit users?

Post by jomann »

I can throw in a feature request, but I doubt we will be able to get to it very soon. The actual changing of the user's permissions isn't necessarily hard but it would definitely require a pretty specific query to be ran on the users that you want to edit.

The query would have to be something like this, and you'd have to run it per user with the user ID portion being changed.

Code: Select all

curl -XPUT localhost:9200/nagioslogserver/user/<user_id> -d '{
    "perms": {
        "alerts": [ "view" ],
        "configure": [ "view" ]
    }
}'
Most user IDs look something like: AVjRGI23U21cuuKLr4er
You also need to put in the proper json object for the permissions
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked