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
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
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
32bf4794
Commit
32bf4794
authored
Oct 12, 2023
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable policy check for now
parent
146c2eb0
Pipeline
#5244
passed with stages
in 63 minutes and 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
PolicyCheck.hs
src/Gargantext/API/Auth/PolicyCheck.hs
+4
-2
Private.hs
test/Test/API/Private.hs
+4
-4
No files found.
src/Gargantext/API/Auth/PolicyCheck.hs
View file @
32bf4794
...
...
@@ -147,9 +147,11 @@ nodeSuper = BConst . Positive . AC_master_user
nodeDescendant
::
NodeId
->
BoolExpr
AccessCheck
nodeDescendant
=
BConst
.
Positive
.
AC_node_descendant
-- FIXME(adinapoli) Checks temporarily disabled.
nodeChecks
::
NodeId
->
BoolExpr
AccessCheck
nodeChecks
nid
=
nodeUser
nid
`
BOr
`
nodeSuper
nid
`
BOr
`
nodeDescendant
nid
nodeChecks
_nid
=
alwaysAllow
where
_disabled
=
nodeUser
_nid
`
BOr
`
nodeSuper
_nid
`
BOr
`
nodeDescendant
_nid
alwaysAllow
::
BoolExpr
AccessCheck
alwaysAllow
=
BConst
.
Positive
$
AC_always_allow
...
...
test/Test/API/Private.hs
View file @
32bf4794
...
...
@@ -116,8 +116,8 @@ tests = sequential $ aroundAll withTestDBAndPort $ do
it
"forbids 'alice' to see others node private info"
$
\
((
_testEnv
,
port
),
app
)
->
do
withApplication
app
$
do
withValidLogin
port
"alice"
(
GargPassword
"alice"
)
$
\
token
->
do
protected
token
"GET"
(
mkUrl
port
"/node/1"
)
""
`
shouldRespondWith
`
403
let
_unused
=
protected
token
"GET"
(
mkUrl
port
"/node/1"
)
""
`
shouldRespondWith
`
403
in
liftIO
$
pendingWith
"POLICY CHECK DISABLED FOR NOW (ISSUE #279)"
describe
"GET /api/v1.0/tree"
$
do
it
"unauthorised users shouldn't see anything"
$
\
((
_testEnv
,
port
),
app
)
->
do
...
...
@@ -133,5 +133,5 @@ tests = sequential $ aroundAll withTestDBAndPort $ do
it
"forbids 'alice' to see others node private info"
$
\
((
_testEnv
,
port
),
app
)
->
do
withApplication
app
$
do
withValidLogin
port
"alice"
(
GargPassword
"alice"
)
$
\
token
->
do
protected
token
"GET"
(
mkUrl
port
"/tree/1"
)
""
`
shouldRespondWith
`
403
let
_unused
=
protected
token
"GET"
(
mkUrl
port
"/tree/1"
)
""
`
shouldRespondWith
`
403
in
liftIO
$
pendingWith
"POLICY CHECK DISABLED FOR NOW (ISSUE #279)"
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