Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot
2024-12-23 09:30:41 +00:00
parent caaa1636f8
commit dcb32080d5
5 changed files with 23 additions and 9 deletions

View File

@ -16,6 +16,11 @@ module API
allow_access_with_scope(Gitlab::Auth.all_available_scopes)
before { authenticate! }
before do
unless ::Current.token_info[:token_type] == 'PersonalAccessToken'
bad_request!("This endpoint requires token type to be a personal access token")
end
end
helpers do
def load_groups

View File

@ -62,7 +62,7 @@
"@gitlab/fonts": "^1.3.0",
"@gitlab/query-language-rust": "0.1.2",
"@gitlab/svgs": "3.121.0",
"@gitlab/ui": "105.6.0",
"@gitlab/ui": "105.7.0",
"@gitlab/vue-router-vue3": "npm:vue-router@4.1.6",
"@gitlab/vuex-vue3": "npm:vuex@4.0.0",
"@gitlab/web-ide": "^0.0.1-dev-20241112063543",

View File

@ -89,6 +89,19 @@ RSpec.describe API::PersonalAccessTokens::SelfInformation, feature_category: :sy
end
end
context 'when the token is not PAT' do
let(:token) { create(:oauth_access_token, scopes: ['api']) }
it 'returns 400' do
get api(path, oauth_access_token: token)
expect(response).to have_gitlab_http_status(:bad_request)
expect(json_response['message']).to eql(
"400 Bad request - This endpoint requires token type to be a personal access token"
)
end
end
context 'when token is expired' do
it 'returns 401' do
token = create(:personal_access_token, expires_at: 1.day.ago, user: current_user)

View File

@ -72,10 +72,6 @@ export default defineConfig({
...(IS_EE ? [] : EE_ALIAS_FALLBACK),
...(IS_JH ? [] : JH_ALIAS_FALLBACK),
...(!IS_EE && !IS_JH ? JH_ELSE_EE_ALIAS_FALLBACK : []),
{
find: '~/',
replacement: javascriptsPath,
},
{
find: '~katex',
replacement: 'katex',

View File

@ -1427,10 +1427,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-3.121.0.tgz#57cacc895929aef4320632396373797a64b230ff"
integrity sha512-ZekVjdMZrjrNEjdrOHsJYCu7A+ea3AkuNUxWIZ3FaNgJj4Oh21RlTP7bQKnRSXVhBbV1jg1PgzQ1ANEoCW8t4g==
"@gitlab/ui@105.6.0":
version "105.6.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-105.6.0.tgz#ad49674b477659238adc211257d290e24201a471"
integrity sha512-rkHpnUShCdl/3fupoxbAed+QwkF28FOOsNfOWb5tqjeq935BJUvvveJp7k8t6KJytCaPp72KT539gOqGmi3Yxg==
"@gitlab/ui@105.7.0":
version "105.7.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-105.7.0.tgz#30a2e78b14ab586bff13d7779991e6650bbff735"
integrity sha512-UWtO3mLpJOmxtp7QN4oPdX9SEFtIclMsEFZlYr2tfDRxULmY9JbGhBXO9fCmELExwM6+hUXGV1gvDz1NtOLnjA==
dependencies:
"@floating-ui/dom" "1.4.3"
echarts "^5.3.2"