diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-25 03:10:55 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-25 03:10:55 +0000 |
commit | 65de487500295d4093cd53d392ea98980f070d57 (patch) | |
tree | 13479f14a93f1a03fd2df70c4004a783e8bbc6f0 /app/serializers | |
parent | b9955afcfbe07fdcf2b819bbf5612e969c4c6910 (diff) | |
download | gitlab-ce-65de487500295d4093cd53d392ea98980f070d57.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/impersonation_access_token_entity.rb | 11 | ||||
-rw-r--r-- | app/serializers/impersonation_access_token_serializer.rb | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/app/serializers/impersonation_access_token_entity.rb b/app/serializers/impersonation_access_token_entity.rb new file mode 100644 index 00000000000..9c59ed58bd8 --- /dev/null +++ b/app/serializers/impersonation_access_token_entity.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +# rubocop: disable Gitlab/NamespacedClass +class ImpersonationAccessTokenEntity < API::Entities::PersonalAccessToken + include Gitlab::Routing + + expose :revoke_path do |token, _options| + revoke_admin_user_impersonation_token_path(token.user, token) + end +end +# rubocop: enable Gitlab/NamespacedClass diff --git a/app/serializers/impersonation_access_token_serializer.rb b/app/serializers/impersonation_access_token_serializer.rb new file mode 100644 index 00000000000..d3ea5ceb305 --- /dev/null +++ b/app/serializers/impersonation_access_token_serializer.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# rubocop: disable Gitlab/NamespacedClass +class ImpersonationAccessTokenSerializer < BaseSerializer + entity ImpersonationAccessTokenEntity +end +# rubocop: enable Gitlab/NamespacedClass |