Fix Bug 924: User is not allowed to upload NS Descriptors for project_user(role)
[osm/NBI.git] / osm_nbi / nbi.py
index e2419cf..b7a2c13 100644 (file)
@@ -257,7 +257,7 @@ valid_url_methods = {
                      },
             "k8sclusters": {"METHODS": ("GET", "POST"),
                             "ROLE_PERMISSION": "k8sclusters:",
-                            "<ID>": {"METHODS": ("GET", "DELETE", "PATCH", "PUT"),
+                            "<ID>": {"METHODS": ("GET", "DELETE", "PATCH"),
                                      "ROLE_PERMISSION": "k8sclusters:id:"
                                      }
                             },
@@ -482,8 +482,8 @@ class Server(object):
 
     def __init__(self):
         self.instance += 1
-        self.engine = Engine()
         self.authenticator = Authenticator(valid_url_methods, valid_query_string)
+        self.engine = Engine(self.authenticator.tokens_cache)
 
     def _format_in(self, kwargs):
         try: