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
9d8afa22
Commit
9d8afa22
authored
Sep 16, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve code comments
parent
eadfc3a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
app/policies/project_policy.rb
app/policies/project_policy.rb
+1
-1
app/services/auth/container_registry_authentication_service.rb
...ervices/auth/container_registry_authentication_service.rb
+2
-2
No files found.
app/models/ci/build.rb
View file @
9d8afa22
...
...
@@ -179,7 +179,7 @@ module Ci
end
def
repo_url
auth
=
"gitlab-ci-token:
#{
ensure_token
}
@"
auth
=
"gitlab-ci-token:
#{
ensure_token
!
}
@"
project
.
http_url_to_repo
.
sub
(
/^https?:\/\//
)
do
|
prefix
|
prefix
+
auth
end
...
...
app/policies/project_policy.rb
View file @
9d8afa22
...
...
@@ -64,7 +64,7 @@ class ProjectPolicy < BasePolicy
can!
:read_deployment
end
# Permissions given when an user is
direct member of a group
# Permissions given when an user is
team member of a project
def
team_member_reporter_access!
can!
:build_download_code
can!
:build_read_container_image
...
...
app/services/auth/container_registry_authentication_service.rb
View file @
9d8afa22
...
...
@@ -90,7 +90,7 @@ module Auth
def
build_can_pull?
(
requested_project
)
# Build can:
# 1. pull from it
'
s own project (for ex. a build)
# 1. pull from its own project (for ex. a build)
# 2. read images from dependent projects if creator of build is a team member
@authentication_abilities
.
include?
(
:build_read_container_image
)
&&
(
requested_project
==
project
||
can?
(
current_user
,
:build_read_container_image
,
requested_project
))
...
...
@@ -102,7 +102,7 @@ module Auth
end
def
build_can_push?
(
requested_project
)
# Build can push only to
project to from which he
originates
# Build can push only to
the project from which it
originates
@authentication_abilities
.
include?
(
:build_create_container_image
)
&&
requested_project
==
project
end
...
...
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