Skip to content
代码片段 群组 项目
提交 19ef40af 编辑于 作者: Sanad Liaquat's avatar Sanad Liaquat
浏览文件

Merge branch 'qa-shl-fix-feature-enabled' into 'master'

Ensure feature exists before checking attributes

See merge request gitlab-org/gitlab!50956
No related branches found
No related tags found
无相关合并请求
...@@ -32,7 +32,7 @@ def disable(key, **scopes) ...@@ -32,7 +32,7 @@ def disable(key, **scopes)
def enabled?(key, **scopes) def enabled?(key, **scopes)
feature = JSON.parse(get_features).find { |flag| flag['name'] == key.to_s } feature = JSON.parse(get_features).find { |flag| flag['name'] == key.to_s }
feature && feature['state'] == 'on' || feature['state'] == 'conditional' && scopes.present? && enabled_scope?(feature['gates'], scopes) feature && (feature['state'] == 'on' || feature['state'] == 'conditional' && scopes.present? && enabled_scope?(feature['gates'], scopes))
end end
private private
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册