Commit b9b92fde authored by Robert Speicher's avatar Robert Speicher

Merge branch '208264-rollout-security-navbar-to-users-created-2019-11-01' into 'master'

Rollout security navbar to more users

See merge request gitlab-org/gitlab!26054
parents e2e7760a fdb38fdf
...@@ -83,7 +83,7 @@ module EE ...@@ -83,7 +83,7 @@ module EE
end end
def show_discover_group_security?(group) def show_discover_group_security?(group)
security_feature_available_at = DateTime.new(2020, 1, 20) security_feature_available_at = DateTime.new(2019, 11, 1)
!!current_user && !!current_user &&
::Gitlab.com? && ::Gitlab.com? &&
......
...@@ -265,7 +265,7 @@ module EE ...@@ -265,7 +265,7 @@ module EE
end end
def show_discover_project_security?(project) def show_discover_project_security?(project)
security_feature_available_at = DateTime.new(2020, 1, 20) security_feature_available_at = DateTime.new(2019, 11, 1)
!!current_user && !!current_user &&
::Gitlab.com? && ::Gitlab.com? &&
......
...@@ -115,7 +115,7 @@ describe GroupsHelper do ...@@ -115,7 +115,7 @@ describe GroupsHelper do
allow(group).to receive(:feature_available?) { security_dashboard_feature_available? } allow(group).to receive(:feature_available?) { security_dashboard_feature_available? }
allow(helper).to receive(:can?) { can_admin_group? } allow(helper).to receive(:can?) { can_admin_group? }
expected_value = user? && created_at > DateTime.new(2020, 1, 20) && gitlab_com? && expected_value = user? && created_at > DateTime.new(2019, 11, 1) && gitlab_com? &&
ab_feature_enabled? && !security_dashboard_feature_available? && can_admin_group? ab_feature_enabled? && !security_dashboard_feature_available? && can_admin_group?
expect(helper.show_discover_group_security?(group)).to eq(expected_value) expect(helper.show_discover_group_security?(group)).to eq(expected_value)
......
...@@ -186,7 +186,7 @@ describe ProjectsHelper do ...@@ -186,7 +186,7 @@ describe ProjectsHelper do
allow(project).to receive(:feature_available?) { security_dashboard_feature_available? } allow(project).to receive(:feature_available?) { security_dashboard_feature_available? }
allow(helper).to receive(:can?) { can_admin_namespace? } allow(helper).to receive(:can?) { can_admin_namespace? }
expected_value = user? && created_at > DateTime.new(2020, 1, 20) && gitlab_com? && expected_value = user? && created_at > DateTime.new(2019, 11, 1) && gitlab_com? &&
ab_feature_enabled? && !security_dashboard_feature_available? && can_admin_namespace? ab_feature_enabled? && !security_dashboard_feature_available? && can_admin_namespace?
expect(helper.show_discover_project_security?(project)).to eq(expected_value) expect(helper.show_discover_project_security?(project)).to eq(expected_value)
......
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