debian-mirror-gitlab/app/presenters/group_member_presenter.rb
2023-03-04 22:38:38 +05:30

25 lines
429 B
Ruby

# frozen_string_literal: true
class GroupMemberPresenter < MemberPresenter
presents ::GroupMember
def last_owner?
member.last_owner_of_the_group?
end
private
def admin_member_permission
:admin_group_member
end
def update_member_permission
:update_group_member
end
def destroy_member_permission
:destroy_group_member
end
end
GroupMemberPresenter.prepend_mod_with('GroupMemberPresenter')