[docs] Admin docs (#12345)
* Enhanced documentation for admin center and django-admin * Fix links and wording * remove placeholders * Fix links * Fix more links
This commit is contained in:
parent
aec215ca2f
commit
d4171f2dcf
|
|
@ -48,7 +48,7 @@ Users can authenticate against the API using basic authentication - specifically
|
|||
Each user is assigned an authentication token which can be used to access the API. This token is persistent for that user (unless invalidated by an administrator) and can be used across multiple sessions.
|
||||
|
||||
!!! info "Token Administration"
|
||||
User tokens can be created and/or invalidated via the user settings, [Admin Center](../settings/admin.md#admin-center) or admin interface.
|
||||
User tokens can be created and/or invalidated via the user settings, [Admin Center](../settings/admin.md#admin-center), or the [Database Admin interface](../settings/db_admin.md).
|
||||
|
||||
#### Requesting a Token
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ If enabled, InvenTree can retain logs of the most recent barcode scans. This can
|
|||
|
||||
Refer to the [barcode settings](../settings/global.md#barcodes) to enable barcode history logging.
|
||||
|
||||
The barcode history can be viewed via the admin panel in the web interface.
|
||||
The barcode history can be viewed in the [Admin Center](../settings/admin.md#admin-center) in the web interface.
|
||||
|
||||
## Barcode Settings
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ title: Importing Data
|
|||
|
||||
## Importing Data
|
||||
|
||||
External data can be imported via the admin interface, allowing for rapid integration of existing datasets, or bulk editing of table data.
|
||||
External data can be imported via the [Admin Center](../settings/admin.md#admin-center), allowing for rapid integration of existing datasets, or bulk editing of table data.
|
||||
|
||||
!!! danger "Danger"
|
||||
Uploading bulk data directly is a non-reversible action.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Parameter templates are used to define the different types of parameters which a
|
|||
|
||||
### Create Template
|
||||
|
||||
Parameter templates are created and edited via the [admin interface](../settings/admin.md).
|
||||
Parameter templates are created and edited via the [Admin Center](../settings/admin.md#admin-center).
|
||||
|
||||
To create a template:
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@ The user menu provides access to the following items:
|
|||
|
||||
- **User Settings:** Access to [user settings](../settings/user.md).
|
||||
- **System Settings:** Access to [global settings](../settings/global.md) settings. *Note: Access to system settings may be restricted based on user permissions.*
|
||||
- **Admin Interface:** Access to the [admin interface](../settings/admin.md) for data management. *Note: Access to the admin interface may be restricted based on user permissions.*
|
||||
- **Admin Center:** Access to the [Admin Center](../settings/admin.md#admin-center) for operational administration.
|
||||
- **Database Admin Interface:** Low-level administration via the [Database Admin interface](../settings/db_admin.md). *Note: Access may be restricted based on user permissions and staff status.*
|
||||
- **Change Color Mode:** Toggle between light and dark color modes.
|
||||
- **About InvenTree:** View version and license information about InvenTree.
|
||||
- **Logout:** Log out of the InvenTree system.
|
||||
|
|
|
|||
|
|
@ -85,4 +85,4 @@ In addition to the primary methods for creating or importing part data, the foll
|
|||
|
||||
- [Via the REST API](../api/index.md)
|
||||
- [Using the Python library](../api/python/index.md)
|
||||
- [Within the Admin interface](../settings/admin.md)
|
||||
- [Within the Database Admin interface](../settings/db_admin.md)
|
||||
|
|
|
|||
|
|
@ -113,10 +113,10 @@ Refer to the [sample plugins]({{ sourcedir("src/backend/InvenTree/plugin/samples
|
|||
|
||||
A *PluginConfig* database entry will be created for each plugin "discovered" when the server launches. This configuration entry is used to determine if a particular plugin is enabled.
|
||||
|
||||
The configuration entries must be enabled via the [InvenTree admin interface](../settings/admin.md).
|
||||
The configuration entries must be enabled via the [Admin Center](../settings/admin.md#admin-center).
|
||||
|
||||
!!! warning "Disabled by Default"
|
||||
Newly discovered plugins are disabled by default, and must be manually enabled (in the admin interface) by a user with staff privileges.
|
||||
Newly discovered plugins are disabled by default, and must be manually enabled (in the Admin Center) by a user with staff privileges.
|
||||
|
||||
## Plugin Mixins
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ npm install
|
|||
npm run build
|
||||
```
|
||||
|
||||
Copy the built `attachment_carousel` directory to the `inventree-data/plugins` directory and enable it via the admin interface.
|
||||
Copy the built `attachment_carousel` directory to the `inventree-data/plugins` directory and enable it via the [Admin Center](../settings/admin.md#admin-center).
|
||||
|
||||

|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ Each part object has access to a lot of context variables about the part. The fo
|
|||
| icon | The name of the icon if set, e.g. fas fa-warehouse |
|
||||
| item_count | Simply returns the number of stock items in this location |
|
||||
| name | The name of the location. This is only the name of this location, not the path |
|
||||
| owner | The owner of the location if it has one. The owner can only be assigned in the admin interface |
|
||||
| owner | The owner of the location if it has one |
|
||||
| parent | The parent location. Returns None if it is already the top most one |
|
||||
| path | A queryset of locations that contains the hierarchy starting from the top most parent |
|
||||
| pathstring | A string that contains all names of the path separated by slashes e.g. A/B/C |
|
||||
|
|
@ -307,8 +307,8 @@ Each part object has access to a lot of context variables about the part. The fo
|
|||
| contact | Contact Name |
|
||||
| phone | Contact phone number |
|
||||
| email | Contact email address |
|
||||
| link | A second URL to the company (Actually only accessible in the admin interface) |
|
||||
| notes | Extra notes about the company (Actually only accessible in the admin interface) |
|
||||
| link | URL associated with the company |
|
||||
| notes | Extra notes about the company |
|
||||
| is_customer | Boolean value, is this company a customer |
|
||||
| is_supplier | Boolean value, is this company a supplier |
|
||||
| is_manufacturer | Boolean value, is this company a manufacturer |
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ Label and report templates are created and edited using the built-in [template e
|
|||
!!! tip "Staff Access Only"
|
||||
Only users with staff access can create, upload or edit templates, snippets and assets.
|
||||
|
||||
!!! info "Backend Admin Interface"
|
||||
Templates can also be managed at a lower level via the [backend admin interface](../settings/admin.md#backend-admin-interface), under the *Report* section. This is recommended for advanced users only.
|
||||
!!! info "Database Admin Interface"
|
||||
Templates can also be managed at a lower level via the [Database Admin interface](../settings/db_admin.md), under the *Report* section. This is recommended for advanced users only.
|
||||
|
||||
### Name and Description
|
||||
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ To make MFA mandatory for all users:
|
|||
|
||||
### Security Consideration
|
||||
|
||||
A user can lock themselves out if they lose access to both the device with their TOTP app and their backup tokens. An admin can delete their tokens from the admin pages (they exist under the 'TOTP devices' / 'static devices' models) . This should be a last resort and only done by people knowledgeable about the [admin pages](../settings/admin.md) as changes there might circumvent InvenTree's business and security logic.
|
||||
A user can lock themselves out if they lose access to both the device with their TOTP app and their backup tokens. An admin can delete their tokens from the Database Admin interface (they exist under the 'TOTP devices' / 'static devices' models). This should be a last resort and only done by people knowledgeable about the [Database Admin interface](../settings/db_admin.md), as changes there might circumvent InvenTree's business and security logic.
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ The basic requirements for configuring SSO are outlined below:
|
|||
|
||||
1. Enable backend for each required SSO provider(s) in the [config file or environment variables](../start/config.md#single-sign-on).
|
||||
1. Create an external *app* with your provider of choice
|
||||
1. Add the required client configurations in the `SocialApp` app in the [admin interface](../settings/admin.md).
|
||||
1. Add the required client configurations in the `SocialApp` app in the [Database Admin interface](../settings/db_admin.md).
|
||||
1. Configure the *callback* URL for the external app.
|
||||
1. Enable SSO for the users in the [global settings](../settings/global.md).
|
||||
1. Configure [e-mail](../settings/email.md).
|
||||
|
|
@ -161,4 +161,4 @@ Make sure all users with admin privileges have sufficient passwords - they can r
|
|||
|
||||
## Error Handling
|
||||
|
||||
If you encounter an error during the SSO process, the error should be logged in the InvenTree database. You can view the [error log](./logs.md) in the [admin interface](./admin.md) to see the details of the error.
|
||||
If you encounter an error during the SSO process, the error should be logged in the InvenTree database. You can view the [error log](./logs.md) in the [Admin Center](./admin.md#admin-center) to see the details of the error.
|
||||
|
|
|
|||
|
|
@ -4,24 +4,23 @@ title: InvenTree Admin Interfaces
|
|||
|
||||
## InvenTree Admin Interfaces
|
||||
|
||||
There are multiple administration interfaces available in InvenTree, which provide different levels of access to the underlying resources and different operational safety.
|
||||
InvenTree provides multiple administration interfaces with different safety levels and intended use cases.
|
||||
|
||||
[**Admin Center**](#admin-center):
|
||||
|
||||
- Main interface for managing InvenTree
|
||||
- Robust verification and safety checks
|
||||
- Main administration interface for day-to-day operations
|
||||
- Uses API-backed flows with validation and safety checks
|
||||
|
||||
[**System Settings**](#system-settings):
|
||||
|
||||
- Access to all settings
|
||||
- Robust verification, requires reading the documentation
|
||||
- Access to global runtime settings
|
||||
- Available to staff users (or users with equivalent API scope)
|
||||
|
||||
[**Backend Admin Interface**](#backend-admin-interface):
|
||||
[**Database Admin Interface**](./db_admin.md):
|
||||
|
||||
- Low level access to the database
|
||||
- Few verification or safety checks
|
||||
- Requires knowledge of InvenTree internals
|
||||
- Recommended for advanced users only
|
||||
- Low-level database administration
|
||||
- Fewer safeguards than the Admin Center
|
||||
- Intended for advanced users and troubleshooting scenarios
|
||||
|
||||
### Admin Center
|
||||
|
||||
|
|
@ -34,7 +33,13 @@ The Admin Center is the main interface for managing InvenTree. It provides a use
|
|||
- Integration with external services (via machines and plugins)
|
||||
- Reporting and statistics
|
||||
|
||||
It can be access via the *Admin Center* link in the top right user menu, the *Admin Center* quick-link in the command palette, or via the navigation menu.
|
||||
#### Access Admin Center
|
||||
|
||||
The Admin Center can be accessed in any of the following ways:
|
||||
|
||||
- User menu in the top-right corner: *Admin Center*
|
||||
- Command palette quick action: *Admin Center*
|
||||
- Direct URL: `/web/settings/admin`
|
||||
|
||||
#### Permissions
|
||||
|
||||
|
|
@ -44,40 +49,6 @@ Some panes can only be accessed by users with specific permissions. For example,
|
|||
|
||||
The System Settings interface provides ordered access to all global settings in InvenTree. Users need to have _staff_ privileges enabled or the _a:staff_ scope.
|
||||
|
||||
### Backend Admin Interface
|
||||
### Database Admin Interface
|
||||
|
||||
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 unrestricted option for directly viewing and modifying database objects.
|
||||
|
||||
!!! warning "Caution"
|
||||
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](./permissions.md).
|
||||
|
||||
#### Access Backend Admin Interface
|
||||
|
||||
To directly access the admin interface, append /admin/ to the InvenTree site URL - e.g. http://localhost:8000/admin/.
|
||||
|
||||
An administration panel will be presented as shown below:
|
||||
|
||||
{{ image("admin/admin.png", "Admin panel") }}
|
||||
|
||||
#### View Database Objects
|
||||
|
||||
Database objects can be listed and filtered directly. The image below shows an example of displaying existing part categories.
|
||||
|
||||
{{ image("admin/part_cats.png", "Part categories") }}
|
||||
|
||||
!!! info "Permissions"
|
||||
A "staff" account does not necessarily provide access to all administration options, depending on the roles assigned to the user.
|
||||
|
||||
##### Filtering
|
||||
|
||||
Some admin views support filtering of results against specified criteria. For example, the list of Part objects can be filtered as follows:
|
||||
|
||||
{{ image("admin/filter.png", "Filter part list") }}
|
||||
|
||||
#### Edit Database Objects
|
||||
|
||||
Individual database objects can be edited directly in the admin interface. The image below shows an example of editing a Part object:
|
||||
|
||||
{{ image("admin/edit_part.png", "Edit part") }}
|
||||
For low-level administration tasks, use the [Database Admin Interface](./db_admin.md).
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
title: InvenTree Database Admin Interface
|
||||
---
|
||||
|
||||
## Database Admin Interface
|
||||
|
||||
The Database Admin interface provides low-level access to InvenTree database objects.
|
||||
|
||||
!!! danger "Low-Level Interface"
|
||||
The Database Admin bypasses many of the application-level safety checks used in the Admin Center.
|
||||
Incorrect edits can create inconsistent data, break workflows, or expose security issues.
|
||||
Use this interface only if you understand the data model and operational impact.
|
||||
|
||||
!!! warning "Recommended Usage"
|
||||
Prefer the [Admin Center](./admin.md#admin-center) for routine administration.
|
||||
Use the Database Admin only for advanced administration and troubleshooting.
|
||||
|
||||
### Access Database Admin Interface
|
||||
|
||||
Access to the Database Admin requires a user account with *staff* privileges.
|
||||
|
||||
Use one of the following methods:
|
||||
|
||||
- Append `/admin/` to the base InvenTree URL (for example: `http://localhost:8000/admin/`)
|
||||
- Use the configured administrator URL from `INVENTREE_ADMIN_URL`
|
||||
|
||||
{{ image("admin/admin.png", "Database Admin panel") }}
|
||||
|
||||
### Permissions
|
||||
|
||||
A "staff" account does not necessarily provide access to all administration options, depending on the roles assigned to the user.
|
||||
|
||||
### View Database Objects
|
||||
|
||||
Database objects can be listed and filtered directly. The image below shows an example of displaying existing part categories.
|
||||
|
||||
{{ image("admin/part_cats.png", "Part categories") }}
|
||||
|
||||
#### Filtering
|
||||
|
||||
Some admin views support filtering of results against specified criteria. For example, the list of Part objects can be filtered as follows:
|
||||
|
||||
{{ image("admin/filter.png", "Filter part list") }}
|
||||
|
||||
### Edit Database Objects
|
||||
|
||||
Individual database objects can be edited directly in the Database Admin interface. The image below shows an example of editing a Part object:
|
||||
|
||||
{{ image("admin/edit_part.png", "Edit part") }}
|
||||
|
||||
!!! danger "Before You Save Changes"
|
||||
Verify your changes carefully before saving.
|
||||
If possible, test changes in a non-production environment first.
|
||||
Record what you changed so it can be reviewed and reverted if needed.
|
||||
|
|
@ -1,22 +1,19 @@
|
|||
---
|
||||
title: Admin Shell
|
||||
title: Error Logs
|
||||
---
|
||||
|
||||
## Error Logs
|
||||
|
||||
Any critical server error logs are recorded to the database, and can be viewed by staff users using the admin interface.
|
||||
Any critical server error logs are recorded to the database, and can be viewed by staff users in the [Admin Center](./admin.md#admin-center), under the *Error Reports* section:
|
||||
|
||||
In the admin interface, select the "Errors" view:
|
||||
{{ image("admin/admin_errors_link.png", "Error Reports in the Admin Center") }}
|
||||
|
||||
{{ image("admin/admin_errors_link.png", "Admin errors") }}
|
||||
|
||||
!!! info "URL"
|
||||
Alternatively, navigate to the error list view at /admin/error_report/error/
|
||||
|
||||
A list of error logs is presented.
|
||||
A list of error logs is presented. Select an entry to view the full error details, including the traceback.
|
||||
|
||||
{{ image("admin/admin_errors.png", "Error logs") }}
|
||||
|
||||
!!! info "Database Admin Interface"
|
||||
Error logs can also be viewed via the [Database Admin interface](./db_admin.md), at the URL `/admin/error_report/error/`
|
||||
|
||||
!!! info "Deleting Logs"
|
||||
Error logs should be deleted periodically
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ title: User Permissions
|
|||
InvenTree provides access control to various features and data, by assigning each *user* to one (or more) *groups* which have multiple *roles* assigned.
|
||||
|
||||
!!! info "Superuser"
|
||||
The superuser account is afforded *all* permissions across an InvenTree installation. This includes the admin interface, web interface, and API.
|
||||
The superuser account is afforded *all* permissions across an InvenTree installation. This includes the [Database Admin interface](./db_admin.md), web interface, and API.
|
||||
|
||||
### User
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ Within each role, there are four levels of available permissions:
|
|||
## Dangerous User Flags
|
||||
|
||||
In addition to the above permissions, there are two special flags that can be assigned to a user:
|
||||
- **Staff** - A user with the *staff* flag is able to access the admin interface, and can trigger dangerous actions that might have a security impact such as changing parsable files on the server (templates / reports / plugins). Some of these actions require the *admin* role to be assigned as well.
|
||||
- **Staff** - A user with the *staff* flag is able to access the [Database Admin interface](./db_admin.md), and can trigger dangerous actions that might have a security impact such as changing parsable files on the server (templates / reports / plugins). Some of these actions require the *admin* role to be assigned as well.
|
||||
- **Superuser** - A user with the *superuser* flag is able to access and change all data and functions of InvenTree. A superuser can modify and access all data that the InvenTree installation / server has access to - including shell access on the server OS itself. This is a very powerful flag, and should be used with caution.
|
||||
|
||||
It is strongly recommended to register any users with staff / superuser flags with strong MFA methods to reduce the risk of unauthorized access. These accounts should be used with caution, and should not be used for day-to-day operations.
|
||||
|
|
@ -62,11 +62,11 @@ It is strongly recommended to register any users with staff / superuser flags wi
|
|||
Practicing account tiering is strongly recommended.
|
||||
|
||||
|
||||
## Admin Interface Permissions
|
||||
## Database Admin 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 does not have the required permissions to perform a certain action in the [Database Admin interface](./db_admin.md), those options will 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.
|
||||
If a user is expecting a certain option to be available in the Database 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
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@ The Django Q work must run separately to the web server. This is started as a se
|
|||
|
||||
If the worker is not running, a warning indicator is displayed in the InvenTree menu bar.
|
||||
|
||||
## Admin Interface
|
||||
## Admin Center
|
||||
|
||||
Scheduled tasks can be viewed in the InvenTree admin interface.
|
||||
Scheduled, pending and failed tasks can be viewed in the [Admin Center](./admin.md#admin-center), under the *Background Tasks* section.
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ The following basic options are available:
|
|||
{{ configsetting("INVENTREE_SITE_URL") }} Specify a fixed site URL |
|
||||
{{ configsetting("INVENTREE_TIMEZONE") }} Server timezone |
|
||||
{{ configsetting("INVENTREE_ADMIN_ENABLED") }} Enable the [django administrator interface]({% include "django.html" %}/ref/contrib/admin/) |
|
||||
{{ configsetting("INVENTREE_ADMIN_URL") }} URL for accessing [admin interface](../settings/admin.md) |
|
||||
{{ configsetting("INVENTREE_ADMIN_URL") }} URL for accessing the [Database Admin interface](../settings/db_admin.md) |
|
||||
{{ configsetting("INVENTREE_LANGUAGE") }} Default language |
|
||||
{{ configsetting("INVENTREE_AUTO_UPDATE") }} Database migrations will be run automatically |
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,8 @@ nav:
|
|||
- Global Settings: settings/global.md
|
||||
- User Settings: settings/user.md
|
||||
- Reference Patterns: settings/reference.md
|
||||
- Admin Interface: settings/admin.md
|
||||
- Admin Center: settings/admin.md
|
||||
- Database Admin Interface: settings/db_admin.md
|
||||
- Setup:
|
||||
- User Permissions: settings/permissions.md
|
||||
- Single Sign on: settings/SSO.md
|
||||
|
|
|
|||
Loading…
Reference in New Issue