teaAuthService
This is a service available under tea.services. TIBCO Enterprise Administrator provides teaAuthService, which is an Angular service that can retrieve a list of privileges associated with a specific user.
teaAuthService provides authorization services. Currently, the only public API is thelistPrivileges method.
Dependencies:
- $q
- $http
Methods
The only method currently available in this service is the listPrivileges method.
Parameters
None.
Returns
{Promise} – Returns a
promise that is resolved with the response object of the
listPrivileges operation. The response object is a list. Each entry in the list has the following properties:
| Property | Type | Description |
|---|---|---|
| product | String | The name of the product that defined this permission. |
| objectType | String | The object type |
| permissions | Object | A Map object with the name of the property as the key. The value object has the following properties:
|
Usage
myModule.controller('MyController', function ($scope, teaAuthService) {
teaAuthService.listPrivileges().then(function(data) {
// this callback will be called asynchronously
// when the response is available.
}, function(error) {
// called asynchronously if an error occurs.
});
});