Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TP CI-CD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Pinglei He
TP CI-CD
Commits
f2bc391a
Commit
f2bc391a
authored
3 years ago
by
Pinglei He
Browse files
Options
Downloads
Patches
Plain Diff
removed unused variables
parent
d2bbf7f0
Branches
master
No related tags found
No related merge requests found
Pipeline
#35258
failed
3 years ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/users.js
+12
-11
12 additions, 11 deletions
app/users.js
with
12 additions
and
11 deletions
app/users.js
+
12
−
11
View file @
f2bc391a
const
MEMBERS
=
[
'
lej
'
,
'
gowoons
'
,
'
dog
'
];
const
MEMBERS
=
[
"
lej
"
,
"
gowoons
"
,
"
dog
"
];
const
cetteVariableEstInutile
=
'
à supprimer
'
;
// Check if an user is a member
// Check if an user is a member
function
isMember
(
login
)
{
function
isMember
(
login
)
{
...
@@ -8,14 +7,16 @@ function isMember(login) {
...
@@ -8,14 +7,16 @@ function isMember(login) {
// Check if an user is a valid administrator
// Check if an user is a valid administrator
function
adminStatus
(
login
,
password
)
{
function
adminStatus
(
login
,
password
)
{
if
(
login
===
process
.
env
.
ADMIN_USERNAME
&&
password
===
process
.
env
.
ADMIN_PASSWORD
)
{
if
(
login
===
process
.
env
.
ADMIN_USERNAME
&&
password
===
process
.
env
.
ADMIN_PASSWORD
)
{
return
{
msg
:
`User
${
login
}
is verified as an admin`
,
status
:
200
};
return
{
msg
:
`User
${
login
}
is verified as an admin`
,
status
:
200
};
}
else
if
(
login
===
process
.
env
.
ADMIN_USERNAME
)
{
}
else
if
(
login
===
process
.
env
.
ADMIN_USERNAME
)
{
return
{
msg
:
`Wrong password for
${
login
}
user`
,
status
:
401
};
return
{
msg
:
`Wrong password for
${
login
}
user`
,
status
:
401
};
}
else
{
}
else
{
return
{
msg
:
`User
${
login
}
is not an admin`
,
status
:
401
};
return
{
msg
:
`User
${
login
}
is not an admin`
,
status
:
401
};
}
}
console
.
log
(
"
Ce texte n'est jamais affiché
"
)
}
}
module
.
exports
.
isMember
=
isMember
;
module
.
exports
.
isMember
=
isMember
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment