-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk User Edit - Group Permissions Not Applying #5558
Comments
You're conflating two different things, I think. Permissions on a user can be null. If you edit a user and do not grant them additional person-level permissions, that field will be populated, but with "inherit" as the permission. This is basically just a side-effect of editing and saving a user, since the form fields on the permissions tab for the user will be collected and added to the user's permission - but null works the same as having that user permissions field populated with nothing but "inherits". |
Could you break down (with screenshots) exactly the use case you've got here? What should the user be able to do, not do, what permissions does the group have/not have, what permissions the user has/is denied, etc. |
Just to clarify, I made no other changes between those screenshots other than editing the user individually. I changed nothing in the users edit page, only clicked Save. Also note that if I select just that one user and use the bulk edit option is will not update the |
I just upgraded to PHP 7.1.17 and SnipeIT 4.4.1 and can confirm that the issue is still happening. |
The user's permissions being null is to be expected. Associating a user to a group doesn't change the individual user's permissions, only group affiliation. You're seeing the permissions mask when you save a user individually because you're submitting the user's permission form (in the permissions tab when you add/edit a user). They're set to inherit from the group if nothing special is selected there. In your User's list, after a bulk edit, does it show the user as belonging to the Users group? (You may need to show the Groups column in your listing). |
I am having the same problem and I'm a little confused by the responses from @snipe . My process is (after an LDAP import of new users) I click the checkbox next to their names in the "Current Users" list then click "Bulk Edit" I then click the group I want them to belong to. When I am brought back to the "Current Users" screen the users show as being apart of the chosen group, in the "Groups" column. However, when one of these people try to log in, they do not have the permissions granted to them by their group that is shown in "Groups" column. To have the permissions take effect I have to navigate to the specific user and click "Edit" then all I have to do is click "Save" without making any changes. Then once they refresh the page, the groups access rights take effect. Is this not what the bulk edit is supposed to be used for or is this a bug? |
I got this issue too and wrote a PR (#6229). It's an error in the checking of user permissions while the user's permission is NULL in the database. |
I am having the same problem too, here is the workaround if the value is NULL , then update to
after that go to Bulk Edit and update the Groups |
This issue is resolved on develop and will be in the next release. |
Hello, |
@snipe you say this is fixed but it was never referenced as a bug fix on any of the releases... |
Fresh install and this is still an issue. Edit single user, change nothing, click save, and the group permissions apply. |
I have the same problem. If i import Users with Ldap from my AD Server and bulk edit them and add them to user group which should make them able to see all assets, it doesnt work. I have to click on every single user, edit and click save, only then, group permissions are set. |
Same issue on my installation : v4.9.3 - build 4395 |
This is still very much an issue, I have to delete the users, reimport them, then manually select the group. |
Any fix or workaround for this @snipe ? |
We are doing the same thing. Delete user, reimport, then manually select the group. |
If your problem appears after ldap importing users and then no group permissions are applied, then I opened a Pr to fix this, but it hasnt been merged yet. You can look it up, its mentioned here in this issue and use the modifications that i used to fix this for me. |
I did try using the Pr you have Joly0 but had an error. Will reattempt, and thank you for contributing a fix for those affected. |
Completely missed that, thanks I'll give that a try! |
I already wrote a PR in 2018 (#6229), which was merged into the develop branch, but apparently has not made its way into master. Did you try it too? |
No, but I definitely will nixn, thanks! |
Hi Nixn, your fix worked beautifully, thank you!! |
Looks like this was not the case, @snipe ... |
Please confirm you have done the following before posting your bug report:
Describe the bug
Users are not assigned permissions from a group when being added to that group using the bulk edit option on the People tab. If you edit the user individually it works as expected
To Reproduce
Go to People tab
Select some users (even just one)
Select the Bulk Edit option at the top
Assign user(s) to a group
Expected behavior
Users should be put in the group (working) and assigned permissions of that group (not working)
Screenshots
If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
Desktop (please complete the following information):
Error Messages
Unable to test in demo and I would need to need to see actual database to confirm issue. No errors listed.
Additional context
Upgraded from 4.2.0
Manual
Add any other context about the problem here.
In trying to find the issue I connected to the DB to see if I might uncover something. That's when I noticed that users that were added to their first group via bulk edit(the users were imported from LDAP and never assigned to a group on SnipeIT) that their
permissions
field was still set to NULL. But when I added users individually to a group I saw that theirpermissions
field got populated with all the different access levels set to 0's. It seems that when thatpermissions
field is set to NULL but they are assigned to a group that has permissions that those group permissions are ignored.Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: