Thank you @jonatandor35 .
What other thread?
It is possible to get the current user, and via the user to get the role. At least it used to be. It was working before. And this was the recommended way (somewhere) to get protected data to the Admin. Did this change? And if so, is there now another way to verify the Admin?
Obviously, as this is in order to protect sensitive information, providing the role from the front-end doesn’t help.
Here’s a fuller excerpt from the code:
import wixUsers from 'wix-users-backend';
import wixData from 'wix-data';
export function gtps(userID) {
let user = wixUsers.currentUser;
console.log("in gtps");
return user.getRoles()
.then((roles) => {
console.log("in then of getRoles");
OK, I found the other thread you were talking about, sorry I missed that. The original response there was incorrect, it should in fact be supported. But it was just reported as fixed, and it is. So we’re good! Thanks again, @jonatandor35