BigW Consortium Gitlab

access_requestable.rb 362 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
# == AccessRequestable concern
#
# Contains functionality related to objects that can receive request for access.
#
# Used by Project, and Group.
#
module AccessRequestable
  extend ActiveSupport::Concern

  def request_access(user)
    members.create(
      access_level: Gitlab::Access::DEVELOPER,
13
      user: user,
14 15 16
      requested_at: Time.now.utc)
  end
end