This code I used from This Post is the current code I am using which works fine for only showing a button to Admin ranking members, however, I do not want to make everyone that I want to use this button an Admin or some variant of a special rank. Is there a way that I can use badges assigned to users to accomplish this, maybe some “if user has this badge” function that I am unaware of?
// show delete button for admin only
import wixUsers from ‘wix-users’ ;
I’m trying this with a custom-created role, but it’s not working because when a member who has this custom role is logged in, their role is returned as “Member” rather than the role’s name that I set. Does this not work with custom roles?
Register a new role then register a new user by your own choosing a ROLE.
Login to the Login-System and take a look onto what you get.
Everything is possible!
@zackarydent Don’t forget to do this in backend if necessary because you are playing with roles and you don’t want to let any user see the admin button.