mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
Permissions Cleanup Tool
This commit is contained in:
parent
471553fa88
commit
3fc36b9ce1
@ -1,4 +1,6 @@
|
|||||||
# Adding and Removing Apps
|
# App Maintenance
|
||||||
|
|
||||||
|
## Adding and Removing Apps
|
||||||
|
|
||||||
Your auth project is just a regular Django project - you can add in [other Django apps](https://djangopackages.org/) as desired. Most come with dedicated setup guides, but here is the general procedure:
|
Your auth project is just a regular Django project - you can add in [other Django apps](https://djangopackages.org/) as desired. Most come with dedicated setup guides, but here is the general procedure:
|
||||||
|
|
||||||
@ -8,3 +10,17 @@ Your auth project is just a regular Django project - you can add in [other Djang
|
|||||||
4. restart AA with `supervisorctl restart myauth:`
|
4. restart AA with `supervisorctl restart myauth:`
|
||||||
|
|
||||||
If you ever want to remove an app, you should first clear it from the database to avoid dangling foreign keys: `python manage.py migrate appname zero`. Then you can remove it from your auth project's `INSTALLED_APPS` list.
|
If you ever want to remove an app, you should first clear it from the database to avoid dangling foreign keys: `python manage.py migrate appname zero`. Then you can remove it from your auth project's `INSTALLED_APPS` list.
|
||||||
|
|
||||||
|
## Permission Cleanup
|
||||||
|
|
||||||
|
Mature Alliance Auth installations, or those with actively developed extensions may find themselves with stale or duplicated Permission models.
|
||||||
|
|
||||||
|
This can make it confusing for admins to apply the right permissions, contribute to larger queries in backend management or simply look unsightly.
|
||||||
|
|
||||||
|
```python
|
||||||
|
python manage.py remove_stale_contenttypes --include-stale-apps
|
||||||
|
```
|
||||||
|
|
||||||
|
This inbuilt Django command will step through each contenttype and offer to delete it, displaying what exactly this will cascade to delete. Pay attention and ensure you understand exactly what is being removed before answering `yes`.
|
||||||
|
|
||||||
|
This should only cleanup uninstalled apps, deprecated permissions within apps should be cleaned up using Data Migrations by each responsible application.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user