Add option to reset admin password with trytond-admin

issue5385
review23251003
This commit is contained in:
Cédric Krier
2016-07-08 10:45:46 +02:00
parent 88fc69453d
commit 599dbd035e
3 changed files with 8 additions and 4 deletions
+1
View File
@@ -1,3 +1,4 @@
* Add option to set admin password with trytond-admin
* Remove super password
* Remove database management from RPC
* Remove ModelView.view_header_get
+1 -1
View File
@@ -54,7 +54,7 @@ def run(options):
Module.update_list()
for db_name in options.database_names:
if init[db_name]:
if init[db_name] or options.password:
# try to read password from environment variable
# TRYTONPASSFILE, empty TRYTONPASSFILE ignored
passpath = os.getenv('TRYTONPASSFILE')
+6 -3
View File
@@ -46,12 +46,15 @@ def get_parser_admin():
metavar='MODULE', help="update a module")
parser.add_argument("--all", dest="update", action="append_const",
const="ir", help="update all installed modules")
parser.add_argument("-p", "--password", dest="password",
action='store_true', help="set the admin password")
parser.add_argument("-m", "--update-modules-list", action="store_true",
dest="update_modules_list", help="Update list of tryton modules")
parser.epilog = ('The first time a database is initialized admin '
'password is read from file defined by TRYTONPASSFILE '
'environment variable or interactively ask user.\n'
parser.epilog = ('The first time a database is initialized '
'or when the password is set, the admin password is read '
'from file defined by TRYTONPASSFILE environment variable '
'or interactively asked from the user.\n'
'The config file can be specified in the TRYTOND_CONFIG '
'environment variable.\n'
'The database URI can be specified in the TRYTOND_DATABASE_URI '