Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-jams
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-jams
Commits
9da6f54d
Commit
9da6f54d
authored
4 years ago
by
Larbi Gharib
Browse files
Options
Downloads
Patches
Plain Diff
Username lowercase ns check
Change-Id: Iaeaf211b5d2e4e8e775e23cffcd784fd6411db7a
parent
ae7c0845
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
jams-react-client/src/globalUrls.js
+2
-0
2 additions, 0 deletions
jams-react-client/src/globalUrls.js
jams-react-client/src/views/UserProfile/EditCreateUserProfile.js
+10
-2
10 additions, 2 deletions
...act-client/src/views/UserProfile/EditCreateUserProfile.js
with
12 additions
and
2 deletions
jams-react-client/src/globalUrls.js
+
2
−
0
View file @
9da6f54d
...
...
@@ -49,6 +49,7 @@ const api_path_delete_admin_contacts = "/api/admin/contacts";
const
api_path_blueprints
=
"
/api/admin/policy
"
;
const
api_path_get_user_profile
=
"
/api/auth/userprofile/
"
;
const
api_path_get_ns_name_from_addr
=
"
/api/nameserver/addr/
"
;
const
api_path_get_ns_addr_from_name
=
"
/api/nameserver/name/
"
;
module
.
exports
=
{
uri
,
...
...
@@ -100,4 +101,5 @@ module.exports = {
api_path_blueprints
,
api_path_get_user_profile
,
api_path_get_ns_name_from_addr
,
api_path_get_ns_addr_from_name
,
};
This diff is collapsed.
Click to expand it.
jams-react-client/src/views/UserProfile/EditCreateUserProfile.js
+
10
−
2
View file @
9da6f54d
...
...
@@ -61,7 +61,7 @@ import {
api_path_post_create_user
,
api_path_post_create_user_profile
,
api_path_get_user_profile
,
api_path_get_
exists_user
,
api_path_get_
ns_addr_from_name
,
}
from
"
../../globalUrls
"
;
import
dashboardStyle
from
"
assets/jss/material-dashboard-react/views/dashboardStyle.js
"
;
...
...
@@ -248,6 +248,7 @@ export default function EditCreateUserProfile(props) {
};
const
handleCreateUser
=
(
data
)
=>
{
data
.
username
=
data
.
username
.
toLowerCase
();
const
body
=
{
username
:
data
.
username
,
password
:
data
.
password
,
...
...
@@ -334,7 +335,14 @@ export default function EditCreateUserProfile(props) {
const
data
=
{
username
:
value
.
toLowerCase
(),
};
axios
(
configApiCall
(
api_path_get_exists_user
,
"
GET
"
,
data
,
null
))
axios
(
configApiCall
(
api_path_get_ns_addr_from_name
+
data
.
username
,
"
GET
"
,
null
,
null
)
)
.
then
((
response
)
=>
{
if
(
response
.
status
===
200
)
{
resolve
(
false
);
...
...
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