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

Simplify condition for group dashboard

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