Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
63f76792
Commit
63f76792
authored
Dec 01, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] test ok. TODO : API info <> demo users should not be able to create accounts
parent
ec36f1c3
Pipeline
#1260
failed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
Share.hs
src/Gargantext/API/Node/Share.hs
+1
-1
User.hs
src/Gargantext/Database/Action/User.hs
+1
-1
New.hs
src/Gargantext/Database/Action/User/New.hs
+2
-1
No files found.
src/Gargantext/API/Node/Share.hs
View file @
63f76792
...
...
@@ -63,7 +63,7 @@ api nId (ShareTeamParams user') = do
case
isRegistered
of
Just
_
->
pure
u
Nothing
->
do
_
<-
newUsers
[
u
]
_
<-
newUsers
[
u
ser'
]
pure
u
fromIntegral
<$>
DB
.
shareNodeWith
(
ShareNodeWith_User
NodeFolderShared
(
UserName
user
))
nId
...
...
src/Gargantext/Database/Action/User.hs
View file @
63f76792
...
...
@@ -31,7 +31,7 @@ getUserId u = do
maybeUser
<-
getUserId'
u
case
maybeUser
of
Nothing
->
nodeError
NoUserFound
Just
u
->
pure
u
Just
u
'
->
pure
u'
getUserId'
::
HasNodeError
err
=>
User
...
...
src/Gargantext/Database/Action/User/New.hs
View file @
63f76792
...
...
@@ -44,9 +44,10 @@ newUserQuick n = do
pass
<-
gargPass
let
u
=
case
guessUserName
n
of
Just
(
u'
,
_m
)
->
u'
Nothing
->
panic
"Email invalid"
Nothing
->
panic
"
[G.D.A.U.N.newUserQuick]:
Email invalid"
pure
(
NewUser
u
n
(
GargPassword
pass
))
------------------------------------------------------------------------
isEmail
::
Text
->
Bool
isEmail
=
((
==
)
2
)
.
List
.
length
.
(
splitOn
"@"
)
...
...
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