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
cbc5f9af
Commit
cbc5f9af
authored
May 24, 2017
by
kushalpandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid hard-coded access level index
parent
9d0ccc54
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
app/assets/javascripts/protected_tags/index.js
app/assets/javascripts/protected_tags/index.js
+2
-0
app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js
...vascripts/protected_tags/protected_tag_access_dropdown.js
+2
-2
No files found.
app/assets/javascripts/protected_tags/index.js
View file @
cbc5f9af
...
...
@@ -10,3 +10,5 @@ export const LEVEL_TYPES = {
USER
:
'
user
'
,
GROUP
:
'
group
'
,
};
export
const
ACCESS_LEVEL_NONE
=
0
;
app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js
View file @
cbc5f9af
/* eslint-disable no-param-reassign, no-underscore-dangle, class-methods-use-this */
/* global Flash */
import
{
ACCESS_LEVELS
,
LEVEL_TYPES
}
from
'
./
'
;
import
{
ACCESS_LEVELS
,
LEVEL_TYPES
,
ACCESS_LEVEL_NONE
}
from
'
./
'
;
export
default
class
ProtectedTagAccessDropdown
{
constructor
(
options
)
{
...
...
@@ -26,7 +26,7 @@ export default class ProtectedTagAccessDropdown {
if
(
ACCESS_LEVELS
.
CREATE
===
this
.
accessLevel
)
{
this
.
isAllowedToCreateDropdown
=
true
;
this
.
noOneObj
=
this
.
accessLevelsData
[
2
]
;
this
.
noOneObj
=
this
.
accessLevelsData
.
find
(
level
=>
level
.
id
===
ACCESS_LEVEL_NONE
)
;
}
this
.
initDropdown
();
...
...
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