X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fadmin_topics.py;h=9f591fcfc1ff380b5bbb17549ced33c61454c49b;hp=a564eae7256275e1d4e33421cc42a243dc2cfe26;hb=9e87a7fbc49d98dfae5fc6b7f4c17b81729a2af7;hpb=0aa89ae83e5f60a2a42a914d4063a95ad12f5139 diff --git a/osm_nbi/admin_topics.py b/osm_nbi/admin_topics.py index a564eae..9f591fc 100644 --- a/osm_nbi/admin_topics.py +++ b/osm_nbi/admin_topics.py @@ -660,7 +660,7 @@ class UserTopicAuth(UserTopic): :return: dictionary, raise exception if not found. """ # Allow _id to be a name or uuid - filter_q = {self.id_field(self.topic, _id): _id} + filter_q = {"username": _id} # users = self.auth.get_user_list(filter_q) users = self.list(session, filter_q) # To allow default filtering (Bug 853) if len(users) == 1: @@ -1027,10 +1027,10 @@ class RoleTopicAuth(BaseTopic): schema_edit = roles_edit_schema multiproject = False - def __init__(self, db, fs, msg, auth, ops): + def __init__(self, db, fs, msg, auth): BaseTopic.__init__(self, db, fs, msg, auth) # self.auth = auth - self.operations = ops + self.operations = auth.role_permissions # self.topic = "roles_operations" if isinstance(auth, AuthconnKeystone) else "roles" @staticmethod