Skip to content

Instantly share code, notes, and snippets.

@kamaravichow
Created August 18, 2021 17:08
Show Gist options
  • Save kamaravichow/6b4e1d0743ed111c694f7b6b3bbb3db2 to your computer and use it in GitHub Desktop.
Save kamaravichow/6b4e1d0743ed111c694f7b6b3bbb3db2 to your computer and use it in GitHub Desktop.
function hasAnyRole(roles) {
return isLoggedIn() && get(/databases/$(database)/documents/users/$(request.auth.uid)).data.roles.hasAny(roles)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment