import Control.Lens (view)
import Gargantext.Database
import Gargantext.Core.Types.Individu (User(..))
-import Gargantext.Database.Action.Flow.Utils (getUserId)
+import Gargantext.Database.Action.User (getUserId)
import Gargantext.Database.Admin.Config (hasNodeType, isInNodeTypes)
import Gargantext.Database.Admin.Types.Hyperdata (HyperdataAny(..))
import Gargantext.Database.Admin.Types.Node
-- | TODO move in Config of Gargantext
publicNodeTypes :: [NodeType]
-publicNodeTypes = [NodeDashboard, NodeGraph, NodePhylo]
+publicNodeTypes = [NodeDashboard, NodeGraph, NodePhylo, NodeFile]
------------------------------------------------------------------------
-
data ShareNodeWith = ShareNodeWith_User { snwu_nodetype :: NodeType
- , snwu_user :: User }
+ , snwu_user :: User
+ }
| ShareNodeWith_Node { snwn_nodetype :: NodeType
- , snwn_node_id :: NodeId
+ , snwn_node_id :: NodeId
}
-
------------------------------------------------------------------------
shareNodeWith :: HasNodeError err
=> ShareNodeWith
folderSharedId <- getFolderId u NodeFolderShared
deleteNodeNode folderSharedId nId
-
unPublish :: HasNodeError err
=> ParentId -> NodeId
-> Cmd err Int