Actions
Defect #38064
closedAvoid exception when adding a project without any givable roles defined
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Affected version:
Description
Project.default_member_role
might return nil
if there is no default member role and no givable role at all.
In the safe_attribute
definition of Project#enabled_module_names
, we use the method's return value without checking this. The attached patch fixes this by using the safe navigation operator there (introduced in Ruby 2.3.0) and denying changing of the modules if the user is not an admin.
Files
Updated by Go MAEDA almost 2 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Target version changed from Candidate for next minor release to 4.2.10
Committed the patch. Thank you.
Actions