I have some features which are allowed only to admin :
if (currentUser.loggedIn && ( currentUser.role === 'Admin')) { $w('#adminBox').show(); }
This works fine on published site, after login with my user which assigned admin role, however when previewing the site i am not able to test that functionality because default user role is: Member and no option to perform login and became an Admin.
How i can workaround this issue? Like to check in wix code that if its a preview, then show adminBox anyway...
As noted in the wix-users API:
The APIs in wix-users are only partially functional when previewing your site. View a published version of your site to see their complete functionality.