Reuse `Gitlab::Allowable` mixin in base service

This commit is contained in:
Grzegorz Bizon 2017-02-14 11:28:30 +01:00
parent c0db4400f4
commit 3063ab45dd
1 changed files with 1 additions and 4 deletions

View File

@ -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