diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-27 00:10:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-27 00:10:03 +0300 |
commit | 317dbfafea6194323cdaaea4d418007d17ca32f1 (patch) | |
tree | 30ddcf34bb9916bdce13751cf3cca2bfb654b9dd /app/serializers | |
parent | 4612d16c2d2dad7ef582bdd6878f02b98e6a84b7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/group_access_token_entity.rb | 4 | ||||
-rw-r--r-- | app/serializers/project_access_token_entity.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/serializers/group_access_token_entity.rb b/app/serializers/group_access_token_entity.rb index e832eef1188..76dc3999a61 100644 --- a/app/serializers/group_access_token_entity.rb +++ b/app/serializers/group_access_token_entity.rb @@ -14,13 +14,13 @@ class GroupAccessTokenEntity < API::Entities::PersonalAccessToken group_id: group.path) end - expose :access_level do |token, options| + expose :role do |token, options| group = options.fetch(:group) next unless group next unless token.user - group.member(token.user)&.access_level + group.member(token.user)&.human_access end end # rubocop: enable Gitlab/NamespacedClass diff --git a/app/serializers/project_access_token_entity.rb b/app/serializers/project_access_token_entity.rb index b317057c952..695a5122348 100644 --- a/app/serializers/project_access_token_entity.rb +++ b/app/serializers/project_access_token_entity.rb @@ -15,13 +15,13 @@ class ProjectAccessTokenEntity < API::Entities::PersonalAccessToken project_id: project.path) end - expose :access_level do |token, options| + expose :role do |token, options| project = options.fetch(:project) next unless project next unless token.user - project.member(token.user)&.access_level + project.member(token.user)&.human_access end end # rubocop: enable Gitlab/NamespacedClass |