Access Control Module strange behavior

I have added a Module to do access control for my Retool App. It uses {{current_user.email}} and go to database to check wether the logged-in user has rights to view data. I have added this module into the app and added a transform rule in SQL configuration to use the permission module. In edit mode, this works as expected, when access module has no permission, we don't see any data. However when we save the app and use it user mode, the retool app shows us data even access control module returns no permission.

Hello @thuang!

That is very odd that your access module is properly hidden in edit mode but not in user mode.

Are you able to check the query runs from the network tab in user mode to see if the check to the DB to see if the users email is valid for the display/hide logic?

Have you tried using the component's hidden property to check the current users information? Can you share screen shots of the logic that does the access control?

I might be able to see whats going on and if I can reproduce this, if you share the app via JSON.