2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-28 13:46:54 +00:00
This commit is contained in:
Oliver Walters 2020-10-07 14:12:25 +11:00
commit a135bbb057
4 changed files with 101 additions and 29 deletions

View File

@ -4,11 +4,13 @@ title: InvenTree Admin Interface
## Admin Interface ## Admin Interface
Users which have administrator privileges have access to an Admin interface which provides extremely low level control of the database. Every item in the database is available and this interface provides a convenient option for directly viewing and modifying database objects. Users which have *staff* privileges have access to an Admin interface which provides extremely low level control of the database. Every item in the database is available and this interface provides a convenient option for directly viewing and modifying database objects.
!!! warning "Caution" !!! warning "Caution"
Admin users should exercise extreme care when modifying data via the admin interface, as performing the wrong action may have unintended consequences! Admin users should exercise extreme care when modifying data via the admin interface, as performing the wrong action may have unintended consequences!
The admin interface allows *staff* users the ability to directly view / add / edit / delete database entries according to their [user permissions](/admin/permissions).
### Access Admin Interface ### Access Admin Interface
To access the admin interface, select the "Admin" option from the drop-down user menu in the top-right corner of the screen. You will be presented with an adminstation panel as shown below: To access the admin interface, select the "Admin" option from the drop-down user menu in the top-right corner of the screen. You will be presented with an adminstation panel as shown below:

71
docs/admin/permissions.md Normal file
View File

@ -0,0 +1,71 @@
---
title: User Permissions
---
## Permissions
!!! warning "TODO"
This section requires further work - in particular screenshots!
InvenTree provides a permission system which allows authority control on a user or group basis.
!!! info "Django Permissions"
InvenTree implements the django permissions system. For background reading, refer to the [django permissions documentation](https://docs.djangoproject.com/en/3.1/topics/auth/default/#permissions-and-authorization).
Permissions can be assigned for each model in the InvenTree database. The following permission classes are available for each model (or "table") in the database:
### View
Users with the *View* permission for a particular model will be able to view data associated with the model.
*For example, a user who has the View permission set for the PurchaseOrder model will be able to view purchase orders.*
### Add
Users with the *Add* permission for a particular model will be able to add (create) new instances of that model.
*For example, a user who has the Add permission set for the StockItem model will be able to add / create new stock item objects.*
### Edit
Users with the *Edit* permissions for a particular model will be able to edit (adjust) instances of that model.
*For example, a user who has the Edit permission set for the Build model will be able to edit Build items.*
### Delete
Users with the *Delete* permission for a particular model will be able to delete instances of that model.
## Superuser Account
The *superuser* account (normally the first user created when configuring the database) automatically has every assigned permission.
## Assigning Permissions
The *superuser* account can assign model permissions to any users or groups.
Additionally, any users who have permissions to edit the *Users* table can also adjust these permissions.
### User Permissions
User permissions allow model permissions to be assigned on a single user basis. This is useful if you wish to finely control which InvenTree features a certain user can access.
### Group Permissions
Group permissions allow model permissions to be assigned to a *group* of users which greatly simplifies the task of assigning similar permissions to multiple users.
## Admin Interface Permissions
If a user does not have the required permissions to perform a certain action in the admin interface, those options not be displayed.
If a user is expecting a certain option to be available in the admin interface, but it is not present, it is most likely the case that the user does not have those permissions assigned.
## Web Interface Permissions
When using the InvenTree web interface, certain functions may not be available for a given user, depending on their permissions. In this case, user-interface elements may be disabled, or may be removed.
## API Permissions
When using the InvenTree API, certain endpoints or actions may be inaccessible for a given user, depending on their permissions.
As the API is used extensively within the web interface, this means that many data tables may also be impacted by user permissions.

View File

@ -62,6 +62,7 @@ nav:
- Order: report/order.md - Order: report/order.md
- Admin: - Admin:
- Admin Interface: admin/admin.md - Admin Interface: admin/admin.md
- User Permissions: admin/permissions.md
- Export Data: admin/export.md - Export Data: admin/export.md
- Import Data: admin/import.md - Import Data: admin/import.md
- Extend: - Extend:
@ -82,12 +83,11 @@ markdown_extensions:
- attr_list - attr_list
- meta - meta
- pymdownx.details - pymdownx.details
- markdown.extensions.codehilite
- pymdownx.highlight - pymdownx.highlight
- pymdownx.superfences - pymdownx.superfences
- pymdownx.emoji: # - pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji # emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg # emoji_generator: !!python/name:materialx.emoji.to_svg
- toc: - toc:
permalink: permalink:

View File

@ -1,24 +1,23 @@
click==7.1.2 click>=7.1.2,<8.0
future==0.18.2 future>=0.18.2,<1.0
Jinja2==2.11.2 Jinja2>=2.11.2,<3.0
joblib==0.16.0 joblib>=0.16.0,<1.0
livereload==2.6.3 livereload>=2.6.3,<3.0
lunr==0.5.8 lunr>=0.5.8,<1.0
Markdown==3.2.2 Markdown>=3.2.2,<4.0
MarkupSafe==1.1.1 MarkupSafe>=1.1.1,<2.0
mkdocs==1.1.2 mkdocs>=1.1.2,<2.0
mkdocs-macros-plugin==0.4.9 mkdocs-macros-plugin>=0.4.9,<1.0
mkdocs-material==5.5.12 mkdocs-material>=5.5.12,<6.0
mkdocs-material-extensions==1.0 mkdocs-material-extensions>=1.0,<2.0
nltk==3.5 nltk>=3.5,<4.0
pip-autoremove==0.9.1 Pygments>=2.7.1,<3.0
Pygments==2.7.1 pymdown-extensions>=8.0,<9.0
pymdown-extensions==8.0 python-dateutil>=2.8.1,<3.0
python-dateutil==2.8.1 PyYAML>=5.3.1,<6.0
PyYAML==5.3.1 regex>=2020.7.14,<2021.0
regex==2020.7.14 repackage>=0.7.3,<1.0
repackage==0.7.3 six>=1.15.0,<2.0
six==1.15.0 termcolor>=1.1.0,<2.0
termcolor==1.1.0 tornado>=6.0.4,<7.0
tornado==6.0.4 tqdm>=4.49.0,<5.0
tqdm==4.49.0