Error when trying to assign a custom role for a project in a root namespace
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Currently I am seeing the following error when trying to assign a custom role to a user for a project in a root namespace.
NoMethodError at /root/blog/-/project_members/101
undefined method `custom_roles_enabled?' for nil:NilClass
To access an interactive console with this error, point your browser to: /__better_errors
ee/app/models/concerns/member_roles/member_role_relation.rb, line 44
39 end
40
41 private
42
43 def validate_member_role_access_level
> 44 return unless member_role_id && member_role_owner.custom_roles_enabled?
45 return if self[base_access_level_attr] == member_role.base_access_level
46
47 errors.add(:member_role_id, _("the custom role's base access level does not match the current access level"))
48 end
49
Edited by 🤖 GitLab Bot 🤖