Commit 95fe44eb authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Partially revert GraphQL policy checks

This commit partially undo the access policy checks for the
GraphQL endpoints, until we find a better story to correlate
the `user_id` we sometimes receive with the info from the
`AuthenticatedUser`.
parent 5dcd1840
Pipeline #5222 failed with stages
in 67 minutes and 24 seconds
......@@ -56,7 +56,9 @@ resolveNodes
-> NodeArgs
-> GqlM e env [Node]
resolveNodes autUser mgr NodeArgs { node_id } =
withPolicy autUser mgr (nodeChecks (NodeId node_id)) $ dbNodes node_id
-- FIXME(adn) We should have a way to enforce the access policy on
-- the public or public folders, instead of using 'alwaysAllow'.
withPolicy autUser mgr alwaysAllow $ dbNodes node_id
resolveNodesCorpus
:: (CmdCommon env)
......
......@@ -60,7 +60,9 @@ resolveTree :: (CmdCommon env)
-> TreeArgs
-> GqlM e env (TreeFirstLevel (GqlM e env))
resolveTree autUser mgr TreeArgs { root_id } =
withPolicy autUser mgr (nodeChecks (NodeId root_id)) $ dbTree root_id
-- FIXME(adn) We should have a way to enforce the access policy on
-- the public or public folders, instead of using 'alwaysAllow'.
withPolicy autUser mgr alwaysAllow $ dbTree root_id
dbTree :: (CmdCommon env) =>
Int -> GqlM e env (TreeFirstLevel (GqlM e env))
......
......@@ -49,7 +49,6 @@ import Gargantext.API.GraphQL.Types
import Gargantext.API.Admin.Auth.Types hiding (Valid)
import Gargantext.API.Auth.PolicyCheck
import Gargantext.API.GraphQL.PolicyCheck
-- import Gargantext.Database.Admin.Types.Node
data UserInfo = UserInfo
{ ui_id :: Int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment