-
Notifications
You must be signed in to change notification settings - Fork 2
Command Reference
This page contains an in-depth description of the management commands provided by django_pph.
### promote_user$ ./manage.py promote_user [username]
Promote user only takes the desired username to promote as its first argument; further arguments will be ignored by the command.
The context doesn't need to be unlocked in order for the command to succeed.
This command will fail under the following scenarios:
- The username does not exist.
- There are repeated usernames (this means your database is malformed).
- The username is already part of the threshold accounts.
./manage.py demote_user [username]
This command removes a user from the accounts that count towards the threshold in the secret-recombination phase. In case a user becomes inactive or shouldn't be trusted, we advise to run this command right away.
In contrast to promote_user, this command needs an unlocked store in order to demote a user.
Promote user only takes the desired username to promote as its first argument; further arguments will be ignored by the command.
Demote user will fail in the following scenarios
- There are not enough threshold accounts to unlock the store after demoting the target user
- There are more than one usernames (the database is inconsistent)
- The username didn't belong to a threshold account
- The store is not unlocked.
$ ./manage.py initialize_pph_context
This command is only meant to be ran during the first run of the django_pph application. When using migrations, this command is already run by the migration script and it is, therefore, unnecessary to run it afterwards.
Be careful when running this command, since it might yield the authentication database useless. Remember always to have backups of your database.
None
If the application is properly configured, this command shouldn't fail.
### update_user$ ./manage.py update_user [username]
This command takes a user account that has been stored using a hash algorithm that's not Django_pph. In this case, we will attempt to turn the existing hash into a proper Django_pph thresholdless account. After this, we can also promote it to be a threshold account using promote_user.
Update_user only takes the desired username to update as its first argument; further arguments will be ignored by the command.
Demote user will fail in the following scenarios
- There are more than one usernames (the database is inconsistent)
- The username's passsword is already a Django_pph compliant hash.
- The username's password has been stored in a hash that's not supported by Django_pph for migration.