X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fauthconn_keystone.py;h=685773b80e73037967751beb752f12a72edccce1;hp=f32cfe9fc10f1f1abb4a3b87f2b9e0e0f1ff129f;hb=f318b3045ae5e005f6241ec170ea943c92cc67d6;hpb=32bab47c7fde8ae22795306723f3441ec544fa2b diff --git a/osm_nbi/authconn_keystone.py b/osm_nbi/authconn_keystone.py index f32cfe9..685773b 100644 --- a/osm_nbi/authconn_keystone.py +++ b/osm_nbi/authconn_keystone.py @@ -45,8 +45,8 @@ from osm_nbi.validation import is_valid_uuid class AuthconnKeystone(Authconn): - def __init__(self, config, db, token_cache): - Authconn.__init__(self, config, db, token_cache) + def __init__(self, config, db): + Authconn.__init__(self, config, db) self.logger = logging.getLogger("nbi.authenticator.keystone") @@ -251,8 +251,9 @@ class AuthconnKeystone(Authconn): user_id = user_obj.id if user_info.get("password") or user_info.get("username") \ or user_info.get("add_project_role_mappings") or user_info.get("remove_project_role_mappings"): + ctime = user_obj._admin.get("created", 0) if hasattr(user_obj, "_admin") else 0 self.keystone.users.update(user_id, password=user_info.get("password"), name=user_info.get("username"), - _admin={"created": user_obj._admin["created"], "modified": time.time()}) + _admin={"created": ctime, "modified": time.time()}) for mapping in user_info.get("remove_project_role_mappings", []): self.remove_role_from_user(user_id, mapping["project"], mapping["role"]) for mapping in user_info.get("add_project_role_mappings", []):