diff --git a/src/risotto/dispatcher.py b/src/risotto/dispatcher.py index e8cd75b..d110063 100644 --- a/src/risotto/dispatcher.py +++ b/src/risotto/dispatcher.py @@ -294,7 +294,7 @@ class Dispatcher(register.RegisterDispatcher, # Verify if user exists and get ID sql = ''' SELECT UserId - FROM RisottoUser + FROM UserUser WHERE UserLogin = $1 ''' user_id = await connection.fetchval(sql, @@ -312,8 +312,8 @@ class Dispatcher(register.RegisterDispatcher, # Check role select_role_uri = ''' SELECT RoleName - FROM URI, RoleURI - WHERE URI.URIName = $1 AND RoleURI.URIId = URI.URIId + FROM UserURI, UserRoleURI + WHERE UserURI.URIName = $1 AND UserRoleURI.URIId = UserURI.URIId ''' select_role_user = ''' SELECT RoleAttribute, RoleAttributeValue diff --git a/src/risotto/http.py b/src/risotto/http.py index 024dd32..10ea270 100644 --- a/src/risotto/http.py +++ b/src/risotto/http.py @@ -109,9 +109,9 @@ async def api(request, async with connection.transaction(): # Check role with ACL sql = ''' - SELECT URI.URIName - FROM URI, RoleURI - WHERE RoleURI.URIId = URI.URIId + SELECT UserURI.URIName + FROM UserURI, UserRoleURI + WHERE UserRoleURI.URIId = UserURI.URIId ''' uris = [uri['uriname'] for uri in await connection.fetch(sql)] risotto_modules = services.get_services_list() diff --git a/src/risotto/message.py b/src/risotto/message.py index 4266e6a..e4453c9 100644 --- a/src/risotto/message.py +++ b/src/risotto/message.py @@ -413,7 +413,7 @@ def load_customtypes() -> None: custom_type = CustomType(load(message_file, Loader=SafeLoader)) ret[version][custom_type.getname()] = custom_type except Exception as err: - raise Exception(_(f'enable to load type {err}: {message}')) + raise Exception(_(f'enable to load type "{message}": {err}')) return ret