@@ -24767,6 +24767,8 @@ CREATE INDEX index_users_ops_dashboard_projects_on_project_id ON users_ops_dashb
CREATE UNIQUE INDEX index_users_ops_dashboard_projects_on_user_id_and_project_id ON users_ops_dashboard_projects USING btree (user_id, project_id);
CREATE INDEX index_users_require_two_factor_authentication_from_group_false ON users USING btree (require_two_factor_authentication_from_group) WHERE (require_two_factor_authentication_from_group = false);
CREATE INDEX index_users_security_dashboard_projects_on_user_id ON users_security_dashboard_projects USING btree (user_id);
CREATE INDEX index_users_star_projects_on_project_id ON users_star_projects USING btree (project_id);
@@ -433,6 +433,13 @@ RSpec.describe Gitlab::GitAccess do
expect{pull_access_check}.toraise_forbidden("Your account has been deactivated by your administrator. Please log back in from a web browser to reactivate your account at #{Gitlab.config.gitlab.url}")
end
it'disallows users with expired password to pull'do
project.add_maintainer(user)
user.update!(password_expires_at: 2.minutes.ago)
expect{pull_access_check}.toraise_forbidden("Your password expired. Please access GitLab from a web browser to update your password.")
end
context'when the project repository does not exist'do
beforedo
project.add_guest(user)
...
...
@@ -969,6 +976,13 @@ RSpec.describe Gitlab::GitAccess do
expect{push_access_check}.toraise_forbidden("Your account has been deactivated by your administrator. Please log back in from a web browser to reactivate your account at #{Gitlab.config.gitlab.url}")
end
it'disallows users with expired password to push'do
project.add_maintainer(user)
user.update!(password_expires_at: 2.minutes.ago)
expect{push_access_check}.toraise_forbidden("Your password expired. Please access GitLab from a web browser to update your password.")
'pre:not([data-math-style]):not([data-mermaid-style]):not([data-kroki-style]) > code'|"descendant-or-self::pre[not(@data-math-style) and not(@data-mermaid-style) and not(@data-kroki-style)]/code"