Page 1 of 1

Bulk edit users?

Posted: Mon Jul 16, 2018 11:58 am
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

Re: Bulk edit users?

Posted: Mon Jul 16, 2018 1:53 pm
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