Project

General

Profile

Actions

Defect #37764

closed

Members without any role shouldn't be allowed

Added by Pavel Rosický over 1 year ago. Updated over 1 year ago.

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

roleless.png (23.7 KB) roleless.png Pavel Rosický, 2022-10-11 20:01
validationerror.png (20.7 KB) validationerror.png Pavel Rosický, 2022-10-11 20:01

Related issues

Is duplicate of Redmine - Defect #37166: Roles of a project member should not be made emptyClosedGo MAEDA

Actions
Actions #2

Updated by Go MAEDA over 1 year ago

  • Is duplicate of Defect #37166: Roles of a project member should not be made empty added
Actions #3

Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Thank you for reporting the issue but the same issue was already reported as #37166.

Actions

Also available in: Atom PDF