Class: Gitlab::BuildAccess

Inherits:
UserAccess show all
Defined in:
lib/gitlab/build_access.rb

Instance Attribute Summary

Attributes inherited from UserAccess

#container, #push_ability, #user

Attributes included from Cache::RequestCache

#request_cache_key_block

Instance Method Summary collapse

Methods inherited from UserAccess

#allowed?, #can_do_action?, #can_update_branch?, #cannot_do_action?, #initialize

Methods included from Cache::RequestCache

extended, #request_cache, #request_cache_key

Constructor Details

This class inherits a constructor from Gitlab::UserAccess

Instance Method Details

#can_access_git?Boolean

This bypasses the `can?(:access_git)`-check we normally do in `UserAccess` for CI. That way if a user was able to trigger a pipeline, then the build is allowed to clone the project.

Returns:

  • (Boolean)

8
9
10
# File 'lib/gitlab/build_access.rb', line 8

def can_access_git?
  true
end