I think the whole thing is safe to remove. The only logic that is not test or config that I can find is this which is called when creating a role:
if role['name'] == CONF.member_role_name:
# Use the configured member role ID when creating the configured
# member role name. This avoids the potential of creating a
# "member" role with an unexpected ID. role['id'] = CONF.member_role_id
else:
role = self._assign_unique_id(role)
In core, there is add_user_to_project( which was the v2 implementation. That called ensure_default_role() to make sure the role existed. This whole path should be V2 onlymy and can be removed.
I think the whole thing is safe to remove. The only logic that is not test or config that I can find is this which is called when creating a role:
if role['name'] == CONF.member_ role_name:
role[ 'id'] = CONF.member_role_id unique_ id(role)
# Use the configured member role ID when creating the configured
# member role name. This avoids the potential of creating a
# "member" role with an unexpected ID.
else:
role = self._assign_
In core, there is add_user_ to_project( which was the v2 implementation. That called ensure_ default_ role() to make sure the role existed. This whole path should be V2 onlymy and can be removed.