X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fadmin_topics.py;h=ffe24fbacae57eb86031bb00c47ff6a8e63e7664;hp=bc2c7d93e76fbdad0afa8b3e90108bbb39b321fa;hb=1ac7f465e8e465980690daba3414a7aadb6fb0b4;hpb=88d58a433404dd19d30a1cce169577a1bd175d90 diff --git a/osm_nbi/admin_topics.py b/osm_nbi/admin_topics.py index bc2c7d9..ffe24fb 100644 --- a/osm_nbi/admin_topics.py +++ b/osm_nbi/admin_topics.py @@ -483,6 +483,8 @@ class UserTopicAuth(UserTopic): del content["projects"] content["project_role_mappings"] = project_role_mappings + return content + def new(self, rollback, session, indata=None, kwargs=None, headers=None): """ Creates a new entry into the authentication backend. @@ -932,8 +934,7 @@ class RoleTopicAuth(BaseTopic): :param _id: server internal id :return: dictionary, raise exception if not found. """ - filter_db = self._get_project_filter(session) - filter_db["_id"] = _id + filter_db = {"_id": _id} role = self.db.get_one(self.topic, filter_db) new_role = dict(role) @@ -1012,8 +1013,7 @@ class RoleTopicAuth(BaseTopic): :return: dictionary with deleted item _id. It raises EngineException on error: not found, conflict, ... """ self.check_conflict_on_del(session, _id, None) - filter_q = self._get_project_filter(session) - filter_q["_id"] = _id + filter_q = {"_id": _id} if not dry_run: self.auth.delete_role(_id) v = self.db.del_one(self.topic, filter_q)