summaryrefslogtreecommitdiff
path: root/app/models/member.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-08-18 22:45:41 +0100
committerSean McGivern <sean@gitlab.com>2016-08-18 22:45:41 +0100
commit883b96ab6a77175d9bac7f03c325428327359cdd (patch)
tree82a9af364b06994820b975cef45d98adf3255523 /app/models/member.rb
parentd2cd9d96965722cca06792c63d76d2704366d7a5 (diff)
downloadgitlab-ce-883b96ab6a77175d9bac7f03c325428327359cdd.tar.gz
Allow project group links to be expired
Diffstat (limited to 'app/models/member.rb')
-rw-r--r--app/models/member.rb6
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?