diff options
Diffstat (limited to 'app/services/members/request_access_service.rb')
-rw-r--r-- | app/services/members/request_access_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/members/request_access_service.rb b/app/services/members/request_access_service.rb index e30722efc13..24293b30005 100644 --- a/app/services/members/request_access_service.rb +++ b/app/services/members/request_access_service.rb @@ -1,6 +1,6 @@ module Members class RequestAccessService < Members::BaseService - def execute + def execute(source) raise Gitlab::Access::AccessDeniedError unless can_request_access?(source) source.members.create( @@ -12,7 +12,7 @@ module Members private def can_request_access?(source) - source && can?(current_user, :request_access, source) + can?(current_user, :request_access, source) end end end |