diff options
author | Sean McGivern <sean@gitlab.com> | 2016-08-18 22:45:41 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-08-18 22:45:41 +0100 |
commit | 883b96ab6a77175d9bac7f03c325428327359cdd (patch) | |
tree | 82a9af364b06994820b975cef45d98adf3255523 /app/models/member.rb | |
parent | d2cd9d96965722cca06792c63d76d2704366d7a5 (diff) | |
download | gitlab-ce-883b96ab6a77175d9bac7f03c325428327359cdd.tar.gz |
Allow project group links to be expired
Diffstat (limited to 'app/models/member.rb')
-rw-r--r-- | app/models/member.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/member.rb b/app/models/member.rb index 84bbbffe718..64e0d33fb20 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -1,6 +1,7 @@ class Member < ActiveRecord::Base include Sortable include Importable + include Expirable include Gitlab::Access attr_accessor :raw_invite_token @@ -31,7 +32,6 @@ class Member < ActiveRecord::Base scope :non_invite, -> { where(invite_token: nil) } scope :request, -> { where.not(requested_at: nil) } scope :has_access, -> { where('access_level > 0') } - scope :expired, -> { where('expires_at <= ?', Time.current) } scope :guests, -> { where(access_level: GUEST) } scope :reporters, -> { where(access_level: REPORTER) } @@ -125,10 +125,6 @@ class Member < ActiveRecord::Base invite? || request? end - def expires? - expires_at.present? - end - def accept_request return false unless request? |