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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
532d43d5
Commit
532d43d5
authored
Feb 21, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove convertPermissionToBoolean() from common_utils.js
parent
ee74f7b8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
22 deletions
+0
-22
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+0
-15
spec/javascripts/lib/utils/common_utils_spec.js
spec/javascripts/lib/utils/common_utils_spec.js
+0
-7
No files found.
app/assets/javascripts/lib/utils/common_utils.js
View file @
532d43d5
...
...
@@ -455,21 +455,6 @@ export const historyPushState = newUrl => {
*/
export
const
parseBoolean
=
value
=>
(
value
&&
value
.
toString
())
===
'
true
'
;
/**
* Converts permission provided as strings to booleans.
*
* @param {String} string
* @returns {Boolean}
*/
export
const
convertPermissionToBoolean
=
permission
=>
{
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
// eslint-disable-next-line no-console
console
.
warn
(
'
convertPermissionToBoolean is deprecated! Please use parseBoolean instead.
'
);
}
return
parseBoolean
(
permission
);
};
/**
* @callback backOffCallback
* @param {Function} next
...
...
spec/javascripts/lib/utils/common_utils_spec.js
View file @
532d43d5
...
...
@@ -409,13 +409,6 @@ describe('common_utils', () => {
});
});
describe
(
'
convertPermissionToBoolean
'
,
()
=>
{
it
(
'
should convert a boolean in a string to a boolean
'
,
()
=>
{
expect
(
commonUtils
.
convertPermissionToBoolean
(
'
true
'
)).
toEqual
(
true
);
expect
(
commonUtils
.
convertPermissionToBoolean
(
'
false
'
)).
toEqual
(
false
);
});
});
describe
(
'
backOff
'
,
()
=>
{
beforeEach
(()
=>
{
// shortcut our timeouts otherwise these tests will take a long time to finish
...
...
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