2019-08-28 16:18:40 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Boards
|
|
|
|
module Lists
|
2021-04-13 14:11:28 -04:00
|
|
|
class UpdateService < Boards::Lists::BaseUpdateService
|
2019-08-28 16:18:40 -04:00
|
|
|
def can_read?(list)
|
2021-03-02 19:10:50 -05:00
|
|
|
Ability.allowed?(current_user, :read_issue_board_list, parent)
|
2019-08-28 16:18:40 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def can_admin?(list)
|
2021-03-02 19:10:50 -05:00
|
|
|
Ability.allowed?(current_user, :admin_issue_board_list, parent)
|
2019-08-28 16:18:40 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2019-09-25 11:06:16 -04:00
|
|
|
|
2021-05-11 17:10:21 -04:00
|
|
|
Boards::Lists::UpdateService.prepend_mod_with('Boards::Lists::UpdateService')
|