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
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
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
8761e73f
Commit
8761e73f
authored
Oct 02, 2023
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup
parent
fb894d00
Pipeline
#4646
passed with stages
in 60 minutes and 25 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
9 deletions
+4
-9
Auth.hs
src/Gargantext/API/Admin/Auth.hs
+1
-3
Types.hs
src/Gargantext/API/Admin/Auth/Types.hs
+1
-4
PolicyCheck.hs
src/Gargantext/API/Auth/PolicyCheck.hs
+1
-0
Node.hs
src/Gargantext/API/GraphQL/Node.hs
+1
-2
No files found.
src/Gargantext/API/Admin/Auth.hs
View file @
8761e73f
...
...
@@ -52,7 +52,7 @@ import Gargantext.API.Admin.Auth.Types
import
Gargantext.API.Admin.EnvTypes
(
GargJob
(
..
),
Env
)
import
Gargantext.API.Admin.Orchestrator.Types
(
JobLog
(
..
),
AsyncJobs
)
import
Gargantext.API.Admin.Types
import
Gargantext.API.Prelude
(
HasJoseError
(
..
),
joseError
,
HasServerError
,
GargServerC
,
GargServer
,
_ServerError
,
GargM
,
GargError
(
..
)
,
serverError
)
import
Gargantext.API.Prelude
(
HasJoseError
(
..
),
joseError
,
HasServerError
,
GargServerC
,
GargServer
,
_ServerError
,
GargM
,
GargError
(
..
))
import
Gargantext.Core.Mail
(
MailModel
(
..
),
mail
)
import
Gargantext.Core.Mail.Types
(
mailSettings
)
import
Gargantext.Core.Types.Individu
(
User
(
..
),
Username
,
GargPassword
(
..
))
...
...
@@ -150,8 +150,6 @@ withAccessM (AuthenticatedUser uId) (PathNodeNode cId docId) m = do
if
True
-- a && d
then
m
else
m
-- serverError err401
withAccessM
(
AuthenticatedUser
uId
)
(
PathNodeOwner
id
)
m
=
do
if
uId
==
id
then
m
else
serverError
err401
withAccess
::
forall
env
err
m
api
.
(
GargServerC
env
err
m
,
HasServer
api
'[
]
)
=>
...
...
src/Gargantext/API/Admin/Auth/Types.hs
View file @
8761e73f
...
...
@@ -107,10 +107,7 @@ instance Arbitrary AuthValid where
,
u
<-
[
1
..
3
]
]
data
PathId
=
PathNode
NodeId
|
PathNodeNode
ListId
DocId
-- | The captured NodeId must be exactly equal to the logged-in user's NodeId.
|
PathNodeOwner
NodeId
data
PathId
=
PathNode
NodeId
|
PathNodeNode
ListId
DocId
---------------------------
...
...
src/Gargantext/API/Auth/PolicyCheck.hs
View file @
8761e73f
...
...
@@ -79,6 +79,7 @@ data AccessCheck
|
AC_master_user
NodeId
-- | Always grant access, effectively a public route.
|
AC_always_allow
-- | Always denies access.
|
AC_always_deny
deriving
(
Show
,
Eq
)
...
...
src/Gargantext/API/GraphQL/Node.hs
View file @
8761e73f
...
...
@@ -3,10 +3,9 @@
module
Gargantext.API.GraphQL.Node
where
import
Control.Monad.Except
(
lift
)
import
Data.Aeson
import
Data.Either
(
Either
(
..
))
import
Data.Morpheus.Types
(
GQLType
)
import
Data.Morpheus.Types
(
GQLType
,
lift
)
import
Data.Text
(
Text
)
import
GHC.Generics
(
Generic
)
import
Gargantext.API.Admin.Auth.Types
...
...
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