summaryrefslogtreecommitdiff
path: root/spec/policies
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-01 00:49:57 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-01 00:49:57 +0000
commitc31c9f964a81f104f4c265b6082b469361fb1653 (patch)
treeff99939150d948ed8e8a1fb1139eb8fac778e69b /spec/policies
parentc6c26f3b730d4bbc567aee33b4c6fd621517055e (diff)
downloadgitlab-ce-c31c9f964a81f104f4c265b6082b469361fb1653.tar.gz
Add latest changes from gitlab-org/security/gitlab@14-0-stable-ee
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/global_policy_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/policies/global_policy_spec.rb b/spec/policies/global_policy_spec.rb
index e88619b9527..85026ced466 100644
--- a/spec/policies/global_policy_spec.rb
+++ b/spec/policies/global_policy_spec.rb
@@ -239,6 +239,14 @@ RSpec.describe GlobalPolicy do
it { is_expected.not_to be_allowed(:access_api) }
end
+ context 'with a deactivated user' do
+ before do
+ current_user.deactivate!
+ end
+
+ it { is_expected.not_to be_allowed(:access_api) }
+ end
+
context 'user with expired password' do
before do
current_user.update!(password_expires_at: 2.minutes.ago)