AV.User API
AV.User.locale
Current user locale
1 | AV.User.locale; // 'en'; |
You can also use User Settings API to get the locale
AV.User.name
Login user name
AV.User.isAdministrator
True if user has administrator permissions
AV.User.checkEntitlement
Check entitlements for the current user context
1 | AV.User.checkEntitlement(entitlementsName); |
Parameters:
entitlementsName
{String|Array} - Entitlement name(s).
1 | AV.User.checkEntitlement('ent_mcs_app_browse').then((result) => { |
In case of an unsuccessful request, the method returns false value or an object with false values.
All data is cached on client side. If the backend list of entitlements has changed, you need to refresh the browser page.