Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
4b7c32d0
Commit
4b7c32d0
authored
Apr 29, 2016
by
c24b
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs
parent
1d561e3c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
140 deletions
+18
-140
about.md
docs/about.md
+3
-0
license.md
docs/about/license.md
+0
-0
release-notes.md
docs/about/release-notes.md
+0
-0
todo.md
docs/about/todo.md
+0
-132
contribution.md
docs/contribution.md
+0
-1
tuto.md
docs/tuto.md
+14
-6
mkdocs.yml
mkdocs.yml
+1
-1
No files found.
docs/about.md
View file @
4b7c32d0
##Welcome to Gargantext documentation
docs/about/license.md
deleted
100644 → 0
View file @
1d561e3c
docs/about/release-notes.md
deleted
100644 → 0
View file @
1d561e3c
docs/about/todo.md
deleted
100644 → 0
View file @
1d561e3c
# API
Be more careful about authorizations.
cf. "ng-resource".
# Projects
## Overview of all projects
-
re-implement deletion
## Single project view
-
re-implement deletion
# Taggers
Path for data used by taggers should be defined in
`gargantext.constants`
.
# Database
# Sharing
Here follows a brief description of how sharing could be implemented.
## Database representation
The database representation of sharing can be distributed among 4 tables:
-
`persons`
, of which items represent either a user or a group
-
`relationships`
describes the relationships between persons (affiliation
of a user to a group, contact between two users, etc.)
-
`nodes`
contains the projects, corpora, documents, etc. to share (they shall
inherit the sharing properties from their parents)
-
`permissions`
stores the relations existing between the three previously
described above: it only consists of 2 foreign keys, plus an integer
between 1 and 3 representing the level of sharing and the start date
(when the sharing has been set) and the end date (when necessary, the time
at which sharing has been removed,
`NULL`
otherwise)
## Python code
The permission levels should be set in
`gargantext.constants`
, and defined as:
```
python
PERMISSION_NONE
=
0
# 0b0000
PERMISSION_READ
=
1
# 0b0001
PERMISSION_WRITE
=
3
# 0b0011
PERMISSION_OWNER
=
7
# 0b0111
```
The requests to check for permissions (or add new ones) should not be rewritten
every time. They should be "hidden" within the models:
-
`Person.owns(node)`
returns a boolean
-
`Person.can_read(node)`
returns a boolean
-
`Person.can_write(node)`
returns a boolean
-
`Person.give_right(node, permission)`
gives a right to a given user
-
`Person.remove_right(node, permission)`
removes a right from a given user
-
`Person.get_nodes(permission[, type])`
returns an iterator on the list of
nodes on which the person has at least the given permission (optional
argument: type of requested node)
-
`Node.get_persons(permission[, type])`
returns an iterator on the list of
users who have at least the given permission on the node (optional argument:
type of requested persons, such as
`USER`
or
`GROUP`
)
## Example
Let's imagine the
`persons`
table contains the following data:
| id | type | username |
|----|-------|-----------|
| 1 | USER | David |
| 2 | GROUP | C.N.R.S. |
| 3 | USER | Alexandre |
| 4 | USER | Untel |
| 5 | GROUP | I.S.C. |
| 6 | USER | Bidule |
Assume "David" owns the groups "C.N.R.S." and "I.S.C.", "Alexandre" belongs to
the group "I.S.C.", with "Untel" and "Bidule" belonging to the group "C.N.R.S.".
"Alexandre" and "David" are in contact.
The
`relationships`
table then contains:
| person1_id | person2_id | type |
|------------|------------|---------|
| 1 | 2 | OWNER |
| 1 | 5 | OWNER |
| 3 | 2 | MEMBER |
| 4 | 5 | MEMBER |
| 6 | 5 | MEMBER |
| 1 | 3 | CONTACT |
The
`nodes`
table is populated as such:
| id | type | name |
|----|----------|----------------------|
| 12 | PROJECT | My super project |
| 13 | CORPUS | A given corpus |
| 13 | CORPUS | The corpus |
| 14 | DOCUMENT | Some document |
| 15 | DOCUMENT | Another document |
| 16 | DOCUMENT | Yet another document |
| 17 | DOCUMENT | Last document |
| 18 | PROJECT | Another project |
| 19 | PROJECT | That project |
If we want to express that "David" created "My super project" (and its children)
and wants everyone in "C.N.R.S." to be able to view it, but not access it,
`permissions`
should contain:
| person_id | node_id | permission |
|-----------|---------|------------|
| 1 | 12 | OWNER |
| 2 | 12 | READ |
If "David" also wanted "Alexandre" (and no one else) to view and modify "The
corpus" (and its children), we would have:
| person_id | node_id | permission |
|-----------|---------|------------|
| 1 | 12 | OWNER |
| 2 | 12 | READ |
| 3 | 13 | WRITE |
If "Alexandre" created "That project" and wants "Bidule" (and no one else) to be
able to view and modify it (and its children), the table should then have:
| person_id | node_id | permission |
|-----------|---------|------------|
| 3 | 19 | OWNER |
| 6 | 19 | WRITE |
docs/contribution.md
View file @
4b7c32d0
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
*
Architecture Overview
*
Architecture Overview
*
Database Schema Overview
*
Database Schema Overview
*
Interface design Overview
*
Interface design Overview
...
...
docs/tuto.md
View file @
4b7c32d0
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
1.
Login
1.
Login
run the gargantex box following the install procedure
run the gargantex box following the install procedure
open a webr
wo
ser at http://127.0.0.1:8000/
open a webr
ow
ser at http://127.0.0.1:8000/
click on Test Gargantext
click on Test Gargantext
login with:
login with:
```
```
...
@@ -14,8 +14,16 @@ Password : autnagrag
...
@@ -14,8 +14,16 @@ Password : autnagrag
2.
Create a project
2.
Create a project
3.
Import an existing corpus
3.
Import an existing corpus
4.
create corpus
5.
Explore
4.
Create corpus from search
6.
Query
7.
Refine
5.
Explore stats
8.
Export
6.
Explore graphs
7.
Query
8.
Refine
*
Time periods
*
Nodes
9.
Export
mkdocs.yml
View file @
4b7c32d0
...
@@ -2,6 +2,6 @@ site_name: Gargantext
...
@@ -2,6 +2,6 @@ site_name: Gargantext
- "Welcome":"index.md"
- "Welcome":"index.md"
- "Installation Guide":"install.md"
- "Installation Guide":"install.md"
- "User Guide":"tuto.md"
- "User Guide":"tuto.md"
- "Contribution Guide":"
dev
.md"
- "Contribution Guide":"
contribution
.md"
- "Next steps":"todo.md"
- "Next steps":"todo.md"
theme
:
readthedocs
theme
:
readthedocs
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