Check if user is at least a certain role level
User object with role
Minimum required role
true if user's role is equal or higher
hasMinRole(user, 'admin') // True for admin and superadmin Copy
hasMinRole(user, 'admin') // True for admin and superadmin
Check if user is at least a certain role level