- 20 Nov, 2024 2 commits
-
-
Grégoire Locqueville authored
-
Grégoire Locqueville authored
-
- 19 Nov, 2024 1 commit
-
-
Alexandre Delanoë authored
-
- 18 Nov, 2024 5 commits
-
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
This function extracts the Node.Update logic for `publish_node` into a separate function, so that we can use it in a `POST` request, i.e. a new endpoint for publishing nodes.
-
Alfredo Di Napoli authored
Previously there was no symmetry in the name of the share endpoint, which is meant to be used to generate a publicly-accessible URL to view a node, and the previously-called "unpulish" endpoint. The problem is that now the "unpublish" name would clash with the dual of publishing a node. To avoid the problem, this commit renames the old "unpublish" endpoint to be "unshare", so that now it's clear that is the inverse operation of "share".
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
This allows the frontend to correctly display a different icon in case a node has been published with edits enabled or not.
-
- 14 Nov, 2024 3 commits
-
-
Alexandre Delanoë authored
-
Alexandre Delanoë authored
-
Alfredo Di Napoli authored
Previous to this commit, `get_user_root_node_folder` would fail with a `UserHasTooManyRoots` in case this was called on a tree which had more than one "public" folder. We fix this by taking the oldest available node, which will always correspond to the notion of "root", being the first ever created.
-
- 13 Nov, 2024 2 commits
-
-
Alexandre Delanoë authored
-
Alexandre Delanoë authored
-
- 12 Nov, 2024 1 commit
-
-
Grégoire Locqueville authored
Also added a warning in `.ghci` in the form of a comment discouraging people from overriding local REPL configuration options
-
- 11 Nov, 2024 16 commits
-
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
This commit splits the policy checks we do on node operations into "read" checks and "write" checks, so that we can enforce different kind of policies based on the state of a node (i.e. published or not).
-
Alfredo Di Napoli authored
This commit refactors the `NodeNodeCategory` so that we create a better hierarchy to account for node publication, including all the policies it might have.
-
Alfredo Di Napoli authored
It also: * Removes UserNodePublic from typesWhiteList in isNodeReadOnly
-
Alfredo Di Napoli authored
This commit refactors a bit the internal of the `Gargantext.Database.Query.Tree` module so that it removes a lot of repetitive boilerplate and paves the way to more interesting features. It also: * Adds the `isUserNode` boolean query * Adjust source and target in publishNode and unpublishNode * Pass the currently-logged-in user to tree API functions
-
Alfredo Di Napoli authored
It also: * Amends tests for policy checks status code changes * Fix a bug in isNodeReadOnly * Adds a function to return all the nodes ids for the published nodes. Next we need to modify `findShared` & co to make sure that published notes will show somewhere in the users' tree.
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
Now this query accounts correctly for recursive children. It also: * Adds basic publish/unpublish works * Add Move API tests scaffolding
-
Alfredo Di Napoli authored
Now a `NodeNodePoly` stores a typed `NodeNodeCategory`, we can use to enforce invariants and making lookups more efficient.
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
This commit makes this function private to the `Table.NodeNode` module as it's fairly low-level, and it doesn't let us embed logic to ensure we are creating a valid node2node relationship. Better use one of the other specialised functions.
-
Alfredo Di Napoli authored
This commit removes the `InsertDB` typeclass, an indirection which wasn't very useful as it was being used in exactly one place in the whole codebase (i.e. the share code). Talking about share, this commit refactors things ever so slightly so that we have a dedicated `shareNode` operation rather than using the low-level `insertNodeNode`.
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
This commit splits the old `NodeAPIEndpoint` type into three; * `NodeAPIEndpoint`, which will also contain the freeze endpoint; * `AnnuaireAPIEndpoint`, which is the plain old node API without extra features; * `CorpusAPIEndpoint`, which will also contain the publishin endpoint. This split ensures that we don't add endpoints which do not belong to all three categories, like before. Furthermore this adds a public nodes SQL queries. It also adds tests for getUserRootPublicNode
-
- 05 Nov, 2024 2 commits
-
-
Grégoire Locqueville authored
The previous commit did not work, because GHCi executed the contents of `.ghci` *before* loading the project. This commit makes a new command, `:ggload`, available from GHCi when in the Gargantext project: typing `:ggload` will make available all symbols from modules named `Prelude` in the Gargantext project. The name `:ggload` as well as the set of modules to import are still open to discussion.
-
Grégoire Locqueville authored
As per issue #422, this commit makes it so that some modules are automatically imported when entering the REPL. The modules are every module named `Prelude`, but exactly which modules should be imported is probably a discussion worth having.
-
- 04 Nov, 2024 3 commits
-
-
Alexandre Delanoë authored
-
Alexandre Delanoë authored
-
Alexandre Delanoë authored
-
- 28 Oct, 2024 5 commits
-
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
This allows us to collect a /history/ of computing times.
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
-
Alfredo Di Napoli authored
The tracking is not perfect yet, as it keeps storing only the latest available compute time. Also, there seems to be some precision loss between that is reported by `timeMeasured` and what gets stored in the DB.
-