debian-mirror-gitlab/app/serializers/group_link/project_group_link_entity.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
476 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
module GroupLink
class ProjectGroupLinkEntity < GroupLink::GroupLinkEntity
include RequestAwareEntity
2022-06-21 17:19:12 +05:30
expose :source do |group_link|
ProjectEntity.represent(group_link.shared_from, only: [:id, :full_name])
2021-03-11 19:13:27 +05:30
end
private
2023-03-17 16:20:25 +05:30
def can_admin_group_link?(group_link, options)
can?(current_user, :admin_project_group_link, group_link)
end
2022-06-21 17:19:12 +05:30
def admin_permission_name
:admin_project_member
2021-03-11 19:13:27 +05:30
end
end
end