I have the front end of the app with filtered UI/UX based off the type of user(true security obviously rests as RLS policies in the supabase backend).
Is there a way to select the user type and see how the front would appear for that user?
I’d suggest picking a user that you know has a specific role and previewing your app with their profile. Then do the same for each role with a different user:
I can’t seem to find the “connect as” box on my interface. Photo Attached.
Is this because supabase and supabase auth are configured using plugins and not via the latest Data & API section (in integrations) due to which the preview panel might be glitching/not visible for me? @Joyce
It does not work with backend configured through supabase data/auth plugins(maybe a deprecated feature or glitch?)
Just to avail this feature, and to be consistent with latest weweb Data&API features, i removed my supabase plugins&auth and learnt the hard way that it took away all my collections and certain links to functions in workflows even when i connected them back via data&api, weeks of work was undone. But lesson learnt. It would be good to have a warning pop up that tells this.
Even after setting the data&api up, i can only “connect as” myself (i’m using supabase auth and have a login via otp system if that matters in anyway). I see another greyed out option saying “managed by supabase” The whole reason i went though this was to be able to view as any user, to see how their front end looks but the users list won’t show up on the connect as drop down even though they exist in supabase auth). Am i missing a step ?
My bad, I read your first post too fast and thought you were just asking if we had a “View as” option. I didn’t connect the dots with your use of Supabase
Not a glitch nor a deprecated feature. The feature didn’t exist back when we were using plugins. The Plugins continue to be supported and related bugs fixed but we are focusing new development efforts on the new Data & API Integrations.
Good point, I agree the existing warning is not scary and explicit enough about what will happen when you delete the plugin. I’ll create a product ticket for this. Were you able to restore a previous backup to get your connections back?
If you are using Supabase for authentication, you won’t see the “View as” toggle per se. You’ll only see if you are previewing the app as a connected user or not. If you want to preview your app as a specific user, you’ll need to log into your WeWeb app as that user. You can also preview your app as a disconnected user. For example, in the example below, there are no recipes on my page because no user is connected:
Regarding your question on back up, it didn’t go through (hence we are rebuilding a lot of the app again) because i think weweb can’t really “put back the removed plugins” when we restore to a backup point for obvious security reasons. That product ticket would really help the community when anyone decides to upgrade from plugins to Data&API cause right now i wouldn’t advice anybody to move from existing plugins unless weweb allows the transitioning without breaking the collections.