X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fnbi.py;h=29fcacd2a8a5a58b93869dbe41d1a086c4bb4f33;hp=67cf58b72c570dbca08fa185313e89f30d0e5bd8;hb=544a2ae8b0b950b55f29c3f0a223ffe4874285e5;hpb=b6480fc3be0d05e4e64f35a12dccdabf249ed94e diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index 67cf58b..29fcacd 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -86,6 +86,7 @@ URL: /osm GET POST action O scale O5 heal 5 + update 05 /ns_lcm_op_occs 5 5 / 5 5 5 TO BE COMPLETED 5 5 @@ -447,6 +448,10 @@ valid_url_methods = { "METHODS": ("POST",), "ROLE_PERMISSION": "ns_instances:id:action:", }, + "update": { + "METHODS": ("POST",), + "ROLE_PERMISSION": "ns_instances:id:update:", + }, }, }, "ns_lcm_op_occs": { @@ -953,7 +958,12 @@ class Server(object): self._set_location_header("admin", "v1", "tokens", outdata["_id"]) # for logging self._format_login(token_info) - + # password expiry check + if self.authenticator.check_password_expiry(outdata): + outdata = {"id": outdata["id"], + "message": "change_password", + "user_id": outdata["user_id"] + } # cherrypy.response.cookie["Authorization"] = outdata["id"] # cherrypy.response.cookie["Authorization"]['expires'] = 3600 elif method == "DELETE":