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
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
f882428c
Commit
f882428c
authored
Dec 02, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] updateUsers pwd
parent
63f76792
Pipeline
#1262
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
Share.hs
src/Gargantext/API/Node/Share.hs
+2
-1
New.hs
src/Gargantext/Database/Action/User/New.hs
+8
-3
No files found.
src/Gargantext/API/Node/Share.hs
View file @
f882428c
...
@@ -51,6 +51,7 @@ instance Arbitrary ShareNodeParams where
...
@@ -51,6 +51,7 @@ instance Arbitrary ShareNodeParams where
]
]
------------------------------------------------------------------------
------------------------------------------------------------------------
-- TODO permission
-- TODO permission
-- TODO refactor userId which is used twice
api
::
HasNodeError
err
api
::
HasNodeError
err
=>
NodeId
=>
NodeId
->
ShareNodeParams
->
ShareNodeParams
...
@@ -66,7 +67,7 @@ api nId (ShareTeamParams user') = do
...
@@ -66,7 +67,7 @@ api nId (ShareTeamParams user') = do
_
<-
newUsers
[
user'
]
_
<-
newUsers
[
user'
]
pure
u
pure
u
fromIntegral
<$>
DB
.
shareNodeWith
(
ShareNodeWith_User
NodeFolderShared
(
UserName
user
))
nId
fromIntegral
<$>
DB
.
shareNodeWith
(
ShareNodeWith_User
NodeFolderShared
(
UserName
user
))
nId
api
nId2
(
SharePublicParams
nId1
)
=
api
nId2
(
SharePublicParams
nId1
)
=
fromIntegral
<$>
DB
.
shareNodeWith
(
ShareNodeWith_Node
NodeFolderPublic
nId1
)
nId2
fromIntegral
<$>
DB
.
shareNodeWith
(
ShareNodeWith_Node
NodeFolderPublic
nId1
)
nId2
...
...
src/Gargantext/Database/Action/User/New.hs
View file @
f882428c
...
@@ -70,12 +70,17 @@ newUsers' address us = do
...
@@ -70,12 +70,17 @@ newUsers' address us = do
_
<-
liftBase
$
mapM
(
mail
Invitation
address
)
us
_
<-
liftBase
$
mapM
(
mail
Invitation
address
)
us
pure
r
pure
r
------------------------------------------------------------------------
------------------------------------------------------------------------
data
SendEmail
=
SendEmail
Bool
updateUser
::
HasNodeError
err
updateUser
::
HasNodeError
err
=>
Text
->
NewUser
GargPassword
->
Cmd
err
Int64
=>
SendEmail
->
Text
->
NewUser
GargPassword
->
Cmd
err
Int64
updateUser
address
u
=
do
updateUser
(
SendEmail
send
)
address
u
=
do
u'
<-
liftBase
$
toUserHash
u
u'
<-
liftBase
$
toUserHash
u
n
<-
updateUserDB
$
toUserWrite
u'
n
<-
updateUserDB
$
toUserWrite
u'
_
<-
liftBase
$
mail
Update
address
u
_
<-
case
send
of
True
->
liftBase
$
mail
Update
address
u
False
->
pure
()
pure
n
pure
n
------------------------------------------------------------------------
------------------------------------------------------------------------
...
...
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