Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
961d43a9
Commit
961d43a9
authored
Sep 27, 2018
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memorize project to avoid re-query
[skip ci]
parent
9f7d75fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
app/models/deploy_token.rb
app/models/deploy_token.rb
+4
-1
No files found.
app/models/deploy_token.rb
View file @
961d43a9
...
...
@@ -4,6 +4,7 @@ class DeployToken < ActiveRecord::Base
include
Expirable
include
TokenAuthenticatable
include
PolicyActor
include
Gitlab
::
Utils
::
StrongMemoize
add_authentication_token_field
:token
AVAILABLE_SCOPES
=
%i(read_repository read_registry)
.
freeze
...
...
@@ -49,7 +50,9 @@ class DeployToken < ActiveRecord::Base
# to a single project, later we're going to extend
# that to be for multiple projects and namespaces.
def
project
projects
.
first
strong_memoize
(
:project
)
do
projects
.
first
end
end
def
expires_at
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment