Infohub JS API
Loading...
Searching...
No Matches
UserRole Class Reference

Description

Role aggregate (info, avatar, permissions, users).

Public Member Functions

 constructor (userRole=({}))
 getAvatar ()
 setAvatar (avatar)
 setFromJSON (userRole=({}))
 toJSON ()

Static Public Member Functions

static createFromJSON (userRole=({}))

Function Documentation

◆ constructor()

constructor ( userRole = ({}))

◆ createFromJSON()

createFromJSON ( userRole = ({}))
static

Create a user role from a JSON object.

Parameters
{object}userRole - The JSON object
Returns
{UserRole}

◆ getAvatar()

getAvatar ( )

Get the avatar of a role.

Returns
{string} - The avatar base64 string

◆ setAvatar()

setAvatar ( avatar)

Set the avatar of a role.

Parameters
{string}avatar - The avatar base64 string
Returns
{void}

◆ setFromJSON()

setFromJSON ( userRole = ({}))

Set the user role from a JSON object.

Parameters
{object}userRole - The JSON object
Returns
{void}

◆ toJSON()

toJSON ( )

Convert the role to a JSON object.

Returns
{object}