diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-30 12:40:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-30 12:40:01 +0000 |
commit | f19a0fa10a0024fab5ef3c556612944f2a62c298 (patch) | |
tree | ef5c359820d2409cf07c0610122299d314ec4743 /app/services/resource_access_tokens | |
parent | eba52140851d2fb08665119c0a3997d0612ccb88 (diff) | |
download | gitlab-ce-f19a0fa10a0024fab5ef3c556612944f2a62c298.tar.gz |
Add latest changes from gitlab-org/security/gitlab@14-2-stable-ee
Diffstat (limited to 'app/services/resource_access_tokens')
-rw-r--r-- | app/services/resource_access_tokens/create_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/resource_access_tokens/create_service.rb b/app/services/resource_access_tokens/create_service.rb index 34aa414de8f..e0371e5d80f 100644 --- a/app/services/resource_access_tokens/create_service.rb +++ b/app/services/resource_access_tokens/create_service.rb @@ -16,6 +16,8 @@ module ResourceAccessTokens return error(user.errors.full_messages.to_sentence) unless user.persisted? + user.update!(external: true) if current_user.external? + access_level = params[:access_level] || Gitlab::Access::MAINTAINER member = create_membership(resource, user, access_level) |