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
b9d79d92
Commit
b9d79d92
authored
Sep 04, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[INIT] user.
parent
8237d093
Pipeline
#557
failed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
8 deletions
+28
-8
README.md
README.md
+4
-4
package.yaml
package.yaml
+14
-0
Flow.hs
src/Gargantext/Database/Flow.hs
+10
-4
No files found.
README.md
View file @
b9d79d92
...
...
@@ -39,17 +39,17 @@ issues.
### Initialization
Users has to be created first
1.
stack ghci
2.
runCmd insertUsersDemo
Users has to be created first (user1 is created as instance):
Then you can log in with user1:1resu
-
stack install
-
~/.local/bin/gargantext-init "gargantext.ini"
## Use Cases
### Multi-User with Graphical User Interface (Server Mode)
~/.local/bin/stack --docker exec gargantext-server -- --ini "gargantext.ini" --run Prod
Then you can log in with user1:1resu
### Command Line Mode tools
...
...
package.yaml
View file @
b9d79d92
...
...
@@ -319,6 +319,20 @@ executables:
-
base
-
servant-server
gargantext-init
:
main
:
Main.hs
source-dirs
:
bin/gargantext-init
ghc-options
:
-
-threaded
-
-rtsopts
-
-with-rtsopts=-N
-
-O2
-
-Wmissing-signatures
dependencies
:
-
gargantext
-
base
tests
:
# garg-test:
# main: Main.hs
...
...
src/Gargantext/Database/Flow.hs
View file @
b9d79d92
...
...
@@ -246,10 +246,9 @@ insertMasterDocs c lang hs = do
type
CorpusName
=
Text
getOrMkRootWithCorpus
::
(
HasNodeError
err
,
MkCorpus
a
)
=>
Username
->
Either
CorpusName
[
CorpusId
]
->
Maybe
a
->
Cmd
err
(
UserId
,
RootId
,
CorpusId
)
getOrMkRootWithCorpus
username
cName
c
=
do
getOrMkRoot
::
(
HasNodeError
err
)
=>
Username
->
Cmd
err
(
UserId
,
RootId
)
getOrMkRoot
username
=
do
maybeUserId
<-
getUser
username
userId
<-
case
maybeUserId
of
Nothing
->
nodeError
NoUserFound
...
...
@@ -264,7 +263,14 @@ getOrMkRootWithCorpus username cName c = do
False
->
pure
rootId'
rootId
<-
maybe
(
nodeError
NoRootFound
)
pure
(
head
rootId''
)
pure
(
userId
,
rootId
)
getOrMkRootWithCorpus
::
(
HasNodeError
err
,
MkCorpus
a
)
=>
Username
->
Either
CorpusName
[
CorpusId
]
->
Maybe
a
->
Cmd
err
(
UserId
,
RootId
,
CorpusId
)
getOrMkRootWithCorpus
username
cName
c
=
do
(
userId
,
rootId
)
<-
getOrMkRoot
username
corpusId''
<-
if
username
==
userMaster
then
do
ns
<-
getCorporaWithParentId
rootId
...
...
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