Permission group for staging DB access

Current plan level (Business):
Annual
Version of Retool : Cloud Hosted

Question / Description: I want to build a user group which has permission only to edit a certain app but not query it. I tried restricting the access to Retool DB however, the user was still able to query the DB and get results.

Is there a way to restrict access to Retool environment? We may only give access to Staging DB and not the production DB and user should not be able to query the production data at all.

I went through this discussion but the solution is not working as intended.

Hi @Viraaj_Arora, welcome to the forum! :wave:

This is definitely possible, we just need a User group with use access only to RetoolDB for the specific environment ('test'):
Screenshot 2024-09-11 at 10.54.25 AM

Since they are 'Viewers,' I enabled this Beta feature so we can test this:
Screenshot 2024-09-11 at 10.56.15 AM
Note: You can find it under Settings -> Beta

In production, this 'memes' table only has one entry:

In staging, it has three:

From the perspective of a user on that Permission Group with 'use only' access for RetoolDB's 'test' environment, their app will automatically load on that environment:

If they change the environment to production, the query will simply not run:

In the console, they'll see a 401 (Unauthorized) and 403 (Forbidden) errors.