Skip to content

Latest commit

 

History

History
78 lines (44 loc) · 2.39 KB

User Guide.md

File metadata and controls

78 lines (44 loc) · 2.39 KB

User Guide

An example database is provided for users to get familiar with Stave. Go to example

Permission System

This chapter is to familiarize users with the permission system in Stave.

With permission system, the user will be able to assign permission per project, per user. For example, user Joe could be allowed to edit project A but not project B.

Preparation (will be moved into README when merged)

pip install django-guardian

Permission Design

6 Per Object Permissions:

  • read_project -- view a certain project and its documents
  • edit_annotation -- add, edit and delete annotations in documents of a certain project
  • edit_text -- edit text pack and other metadata of documents, of a certain project
  • edit_project -- edit metadata of a certain project
  • remove_project -- remove documents in a certain project
  • new_project -- create new documents in a certain project

2 Default Django Permissions:

  • add_project -- create new project
  • view_project -- access all projects

Besides, a staff user and the owner (default the creator) of the project has all access on this project (with documents inside).

How to assign permissions

Firstly, log in as a staff member through Django admin site, which is http://localhost:8000/admin/

To assign permission per object:

  1. click the project

1602340639614

  1. click "Object Permissions" in the upper-right corner 1602340701593

  2. Enter exact user name to find or edit users already modified before

1602340789060

  1. Assign permissions.

    Reminder: Only assign permissions mentioned in Permission Design, others are not yet configurated.

1602340885885

Example Database

Users:

  • normal1
    • password: example1
  • normal2
    • password: example2

Projects:

  • example-project-1
    • owner is user normal1
  • example-project-2
    • owner is normal2