Return:
Type | Description |
---|---|
SimpleRecord object | This method returns the current attribute object. |
Example:
const record = new SimpleUser(); let user = record.getContext(); //user or employee attributes ss.info(record.hasRole('admin')); //true | false ss.info("Does this user have the security admin role? " + record.hasRole('security_admin')); // true | false ss.info("Is the navigator menu pinned? " + record.getPreference('menu.pin')); // -1 / 0 / 1 record.setPreference('New user preference', 'Menu pinning'); ss.info("New preference value: " + record.getPreference('New user preference')); //Menu pinning ss.info("not existing preference: " + record.getPreference('non-existing preference')); //null ss.info(user.username); //admin |
Return:
Type | Description |
---|---|
String | Current user ID. |
Parameter(s):
Name | Type | Mandatory | Default Value |
---|---|---|---|
preferenceName | String | Y | N |
Return:
Type | Description |
---|---|
String | This method returns the specified preference value for the current user. If the specified preference does not exist, it returns NULL. |
Parameter(s):
Name | Type | Mandatory | Default Value |
---|---|---|---|
role | String | Y | N |
Return:
Type | Description |
---|---|
Boolean | This method approves or disproves an assumption whether a specified user is granted with a specified role. |
Parameter(s):
Name | Type | Mandatory | Default Value |
---|---|---|---|
preferenceName | String | Y | N |
value | String | Y | N |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |