Reuse `Gitlab::Allowable` mixin in base service
This commit is contained in:
parent
c0db4400f4
commit
3063ab45dd
|
@ -1,4 +1,5 @@
|
|||
class BaseService
|
||||
include Gitlab::Allowable
|
||||
include Gitlab::CurrentSettings
|
||||
|
||||
attr_accessor :project, :current_user, :params
|
||||
|
@ -7,10 +8,6 @@ class BaseService
|
|||
@project, @current_user, @params = project, user, params.dup
|
||||
end
|
||||
|
||||
def can?(object, action, subject)
|
||||
Ability.allowed?(object, action, subject)
|
||||
end
|
||||
|
||||
def notification_service
|
||||
NotificationService.new
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue