expire all auth tokens when updating (will force page reload to pull latest index.html)

This commit is contained in:
wh1te909 2020-02-02 09:30:50 +00:00
parent 2b9e9b8b1b
commit 78a8e63e0a
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,10 @@
from django.core.management.base import BaseCommand
from knox.models import AuthToken
class Command(BaseCommand):
help = "Deletes all knox tokens"
def handle(self, *args, **kwargs):
AuthToken.objects.all().delete()
self.stdout.write("All tokens have been deleted!")

View File

@ -14,6 +14,7 @@ cd /home/${USER}/rmm/api/tacticalrmm
pip install -r /home/${USER}/rmm/api/tacticalrmm/requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py delete_tokens
deactivate