I’ve used doppio to add a spa portal page to my custom app, and now I am wanting to show different things based on the current user’s roles, but I can’t seem to figure out the correct way to do so. I found if the user has permission, I can make a call to /api/resource/User/ and use that, but I don’t want to give that extra permission to the users if I don’t have to.
Alternatively, is there a way to add context to the Vue pages like you can do with the regular static pages that would allow me to get the user’s roles?
Hi, thanks for your reply, I did get it working through that method and using the REST API, but I have to ask, how do you get the frappe object for a portal page? I know for client/server side scripts in frappe builder have that object automatically attached, but I could never figure out how to get it to attach to a custom portal page. I’ve tried various things but the frappe object always comes back as undefined.