diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-09-06 15:46:57 +0200 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-04-23 09:21:41 +0200 |
commit | 9507f39459316719088722510a6ae11b79a4b442 (patch) | |
tree | c4d0dd53ed0032e7aecd748650be21531ece28e9 /app/models/group.rb | |
parent | 14c8dbc66537e59d9a01fe5e8ad64ba559254f14 (diff) | |
download | gitlab-ce-9507f39459316719088722510a6ae11b79a4b442.tar.gz |
add runners_token column to namespaces
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 8ff781059cc..ec27f757f46 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -9,6 +9,7 @@ class Group < Namespace include SelectForProjectAuthorization include LoadedInGroupList include GroupDescendant + include TokenAuthenticatable has_many :group_members, -> { where(requested_at: nil) }, dependent: :destroy, as: :source # rubocop:disable Cop/ActiveRecordDependent alias_method :members, :group_members @@ -43,6 +44,9 @@ class Group < Namespace validates :two_factor_grace_period, presence: true, numericality: { greater_than_or_equal_to: 0 } + add_authentication_token_field :runners_token + before_save :ensure_runners_token + after_create :post_create_hook after_destroy :post_destroy_hook after_save :update_two_factor_requirement |