Last updated
Was this helpful?
Last updated
Was this helpful?
User class handles the authenticated user
Returns: Object
| Object
- User details
Boolean
Check if current user has a specific access permission
Available permissions are (more permissions may come in the future as the need for granularity grows):
Returns: Boolean
- exists
boolean
Convinience method to find out if current user is a "user"
Returns: boolean
- If user is "user"
boolean
Convinience method to find out if current user is a "power user"
Returns: boolean
- If user is "power user"
boolean
Convinience method to find out if current user is an "admin user"
Returns: boolean
- If user is "admin"
Get current logged in user info object. Object contains info about current user, organisation, selected unit and permissions
Returns: Promise.<{given_name:String, family_name:String, email:String, picture:String, org:String, unit: String, permissions: Array.<string>}>
- User details
void
Logout current user and reload page to trigger new login flow
Param
Type
Description
permission
String
Required - Permission to look for in users permissions