Hi, colleagues
During the last days I found that getRoles() is getting not working from the backend. It is worked ok on my site during the last 1.5 years but in these coronadays I observed that something happened and it is getting generate exception. It seems Wix people hiddenly changed a bit an APIs and this functionality is getting not available anymore.
Do anybody knows what would happened and how to fix this?
very small snippet from the backend:
import wixUsers from ‘wix-users-backend’
export function getUserCaps111()
{
let user = wixUsers.currentUser;
return user.getRoles().then((result)=>
{
return (result);
});
}
btw, getRoles() still works from the client side, but this is not what I need because I’ve got a lot of existing code around backend autorization.
Tnx. Alexey