Actions
Defect #38443
closedCannot add a user to a group if the group is a member without roles in a certain project
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
An exception will be raised if you attempt to add a user to a group if the group is a member without any roles in a certain project. The attempt will fail with the following error.
Completed 422 Unprocessable Entity in 36ms (ActiveRecord: 14.5ms | Allocations: 14551) ActiveRecord::RecordInvalid (Validation failed: Role cannot be empty): app/models/group.rb:90:in `block in user_added' app/models/group.rb:81:in `user_added' app/controllers/groups_controller.rb:118:in `add_users' lib/redmine/sudo_mode.rb:61:in `sudo_mode
You can reproduce the error with the following steps:
1. Add a group as a project member with any role
2. Edit the member and clear checkboxes for all roles and save
3. Go to Administration > Groups
4. Add a user to the group. You cannot add a group. The above error will be logged
Files
Related issues
Actions