Namespace roles
provides access to roles
Defined in: rhqapi.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
roles.createRole(params)
Creates a new role acorrding to given parameters.
|
<static> |
roles.deleteRoles(roleNames)
Deletes given roles.
|
<static> |
roles.findRoles(params)
Finds all roles according to given parameters.
|
<static> |
roles.getRole(roleName)
Gets a given role.
|
<static> |
roles.printValidParams()
Prints all valid accepted parameters
|
Method Detail
<static>
{Role}
roles.createRole(params)
Creates a new role acorrding to given parameters.
roles.createRole({name: "boss",description:"Role with all permissions.",permissions:permissions.all });
- Parameters:
- {Object} params
- - see roles.validParams for available params.
- Returns:
- {Role} a newly created role
<static>
roles.deleteRoles(roleNames)
Deletes given roles.
roles.deleteRoles(["boss","guest"]);
- Parameters:
- {Array} roleNames
- - array with names of roles to delete
<static>
{Role[]}
roles.findRoles(params)
Finds all roles according to given parameters.
- Parameters:
- {Object} params
- - see RoleCriteria.addFilter[param] methods for available params
- Returns:
- Array of found roles.
<static>
{Role}
roles.getRole(roleName)
Gets a given role. Returns found role or null.
- Parameters:
- {string} roleName
- - name of the role
- Returns:
- {Role} a found role or null
<static>
roles.printValidParams()
Prints all valid accepted parameters