Hey @James_Gould - the simplest recommendation I can make if you need the query to fail is to check the length of the results array in the query's transformer and throw an error under certain conditions.
Just to be clear, though, our Terms of Service do not allow users to share account credentials. It sounds like the use case you're describing may be an attempt to circumvent this restriction, but I'm happy to be of assistance if there's additional context you can share!
I'm not attempting to intentionally circumvent the restricts, it might help if I explain what I attempting to achieve:
I want Admins in retool to have full access to modify themes, etc in the account. Also they will be able to manage user logins.
I want users navigate to the app (via a http link) to hit the retool login, then reach the app login. The reason for using a link is that there will be other apps within the account.
The app login part is only to direct users to the correct page based on their job_role (I.e. Admin goes to Dashboard, Manager goes to management page, regular user goes to new entry page).
I haven't found a way to use the Retool user permissions to point them to the correct page. Hence using making a simple login page.
Does this violate the T&Cs? If so is there an alternative? Should I just allow any of the user to access the all the pages in the app?
I'm pretty sure the solution I referenced above should do exactly that! By throwing an error in the transformer, you're telling Retool to use the Failure event handler.