Is currentMember.getRoles() on the front end secure?

I’d like to show elements on a page to admin/site owners only. If I were to use something like currentMember.getRoles() on the frontend to test for admin/site owner, is there any Wix magic that would stop a hacker from spoofing that logic?

If not, what is the recommended way to security restrict content on a public page to admin/site owners only?

Nothing is SECURE on FRONTEND!
This for you have BACKEND.

If you have sensitive data like …

  1. Passwords
  2. Keys/Serials
  3. Api-activation-codes
  4. some sensitive data inside of your DATABASE
  5. and so on…

Do work with it only on BACKEND!
And use also the Wix-Secrets-API if need.