Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-07-24 17:30:09 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-07-25 16:06:27 +0300
commite3aaa56c92f97f8aff3aeb847754794e9eae4706 (patch)
treeeb6c343901284f826ed808e500a53c7e804988dd /app/models/deploy_token.rb
parent3f14c56bfe77e83084b58dc2bd3c34e3c84c6cae (diff)
Introduce PolicyCheckable for checking policies
Diffstat (limited to 'app/models/deploy_token.rb')
-rw-r--r--app/models/deploy_token.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/models/deploy_token.rb b/app/models/deploy_token.rb
index 7ab647abe93..51029950dda 100644
--- a/app/models/deploy_token.rb
+++ b/app/models/deploy_token.rb
@@ -1,6 +1,7 @@
class DeployToken < ActiveRecord::Base
include Expirable
include TokenAuthenticatable
+ include PolicyCheckable
add_authentication_token_field :token
AVAILABLE_SCOPES = %i(read_repository read_registry).freeze
@@ -58,10 +59,6 @@ class DeployToken < ActiveRecord::Base
write_attribute(:expires_at, value.presence || Forever.date)
end
- def admin?
- false
- end
-
private
def ensure_at_least_one_scope