BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9db87fce
Commit
9db87fce
authored
Apr 07, 2017
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Protected tags changes from backend maintainer review
parent
8a5ca112
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
protected_ref_access.rb
app/models/concerns/protected_ref_access.rb
+1
-1
protected_ref_matcher.rb
app/models/protected_ref_matcher.rb
+3
-1
18471-restrict-tag-pushes-protected-tags.yml
...s/unreleased/18471-restrict-tag-pushes-protected-tags.yml
+1
-1
No files found.
app/models/concerns/protected_ref_access.rb
View file @
9db87fce
...
...
@@ -11,7 +11,7 @@ module ProtectedRefAccess
end
def
check_access
(
user
)
return
true
if
user
.
is_
admin?
return
true
if
user
.
admin?
project
.
team
.
max_member_access
(
user
.
id
)
>=
access_level
end
...
...
app/models/protected_ref_matcher.rb
View file @
9db87fce
...
...
@@ -4,7 +4,7 @@ class ProtectedRefMatcher
end
# Returns all protected refs that match the given ref name.
# This
realize
s all records from the scope built up so far, and does
# This
check
s all records from the scope built up so far, and does
# _not_ return a relation.
#
# This method optionally takes in a list of `protected_refs` to search
...
...
@@ -38,6 +38,8 @@ class ProtectedRefMatcher
end
def
wildcard_match?
(
ref_name
)
return
false
unless
wildcard?
wildcard_regex
===
ref_name
end
...
...
changelogs/unreleased/18471-restrict-tag-pushes-protected-tags.yml
View file @
9db87fce
---
title
:
Protected Tags featur
e
title
:
Tags can be protected, restricting creation of matching tags by user rol
e
merge_request
:
10356
author
:
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