Commit 2b6a87f6 authored by Tetiana Chupryna's avatar Tetiana Chupryna

Simplify condition for group dashboard

parent 509ff29b
......@@ -25,8 +25,8 @@ module EE
::Gitlab::CurrentSettings.lock_memberships_to_ldap?
end
condition(:security_dashboard_feature_disabled) do
!@subject.feature_available?(:security_dashboard)
condition(:security_dashboard_feature_enabled) do
@subject.feature_available?(:security_dashboard)
end
condition(:needs_new_sso_session) do
......@@ -129,13 +129,10 @@ module EE
end
rule { developer }.policy do
enable :read_group_security_dashboard
enable :admin_merge_request
end
rule { security_dashboard_feature_disabled }.policy do
prevent :read_group_security_dashboard
end
rule { security_dashboard_feature_enabled & developer }.enable :read_group_security_dashboard
rule { needs_new_sso_session }.policy do
prevent :read_group
......
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