What’s the easiest way to do
if user.isAdmin() {
// only show if admin
}
struct User {
func isAdmin() {
/ / code here
}
}
I’m looking into the ParseSwift samples but I’m still a bit confused on how to implement this best.
Is it just a matter of returning all roles related to the user, and checking if the admin role exists in the returned array?