Commit f9cc6aad authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix group variable API to detect feature from group

parent 8a68e849
......@@ -863,7 +863,11 @@ module API
# EE
expose :environment_scope, if: ->(variable, options) {
variable.project.feature_available?(:variable_environment_scope)
if variable.respond_to?(:projects)
variable.project
else
variable.group
end.feature_available?(:variable_environment_scope)
}
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment