Actions
Defect #37764
closedMembers without any role shouldn't be allowed
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Duplicate
Affected version:
Description
1/ go to a project settings
2/ add a new member (note that there's an error if the role isn't selected)
3/ so choose a role
4/ edit the member again and this time remove all his roles
5/ this works, but there should be an error instead
this way you can create an invalid member that could lead to internal errors elsewhere
xhr doesn't show validation errors at all
https://github.com/redmine/redmine/blob/master/app/controllers/members_controller.rb#L93
member_roles are deleted even before actually saving the member
https://github.com/redmine/redmine/blob/master/app/models/member.rb#L77
I think it's a bug
Environment: Redmine version 5.0.3.stable Ruby version 3.0.2-p107 (2021-07-07) [x86_64-linux] Rails version 6.1.7 Environment production Database adapter Mysql2 Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp SCM: Subversion 1.10.4 Mercurial 4.8.2 Git 2.20.1 Filesystem Redmine plugins: no plugin installed
Files
Related issues
Actions