debian-mirror-gitlab/app/models/concerns/access_requestable.rb
2016-06-16 23:09:34 +05:30

16 lines
362 B
Ruby

# == 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,
user: user,
requested_at: Time.now.utc)
end
end