Fix api auth
This commit is contained in:
parent
bcb60111b2
commit
506c6e9c9a
@ -53,6 +53,7 @@ def get_args():
|
||||
p_ingest.add_argument("files", nargs="+", help="files to import")
|
||||
p_ingest.add_argument("-c", "--copy-of", help="existing uuid the imported images will be placed under")
|
||||
|
||||
# User section
|
||||
p_adduser = sp_action.add_parser("user", help="user manipulation functions")
|
||||
p_useraction = p_adduser.add_subparsers(dest="action_user", help="action to take")
|
||||
|
||||
|
@ -473,6 +473,8 @@ def main():
|
||||
SAEnginePlugin(cherrypy.engine, library.engine).subscribe()
|
||||
api = PhotosApi()
|
||||
cherrypy.tree.mount(api, '/api', {'/': {'tools.trailing_slash.on': False,
|
||||
'tools.auth_basic.on': True,
|
||||
'tools.auth_basic.realm': 'photolib',
|
||||
'tools.auth_basic.checkpassword': validate_password,
|
||||
'tools.db.on': True}})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user