Add option to reset admin password with trytond-admin
issue5385 review23251003
This commit is contained in:
@@ -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
@@ -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')
|
||||
|
||||
@@ -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 '
|
||||
|
||||
Reference in New Issue
Block a user