BigW Consortium Gitlab

Commit 3063ab45 by Grzegorz Bizon

Reuse `Gitlab::Allowable` mixin in base service

parent c0db4400
class BaseService class BaseService
include Gitlab::Allowable
include Gitlab::CurrentSettings include Gitlab::CurrentSettings
attr_accessor :project, :current_user, :params attr_accessor :project, :current_user, :params
...@@ -7,10 +8,6 @@ class BaseService ...@@ -7,10 +8,6 @@ class BaseService
@project, @current_user, @params = project, user, params.dup @project, @current_user, @params = project, user, params.dup
end end
def can?(object, action, subject)
Ability.allowed?(object, action, subject)
end
def notification_service def notification_service
NotificationService.new NotificationService.new
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment