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:
  1. $q
  2. $http

Methods

The only method currently available in this service is the listPrivileges method.

listPrivileges
Returns the list of privileges associated with the current user.

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:
  1. productName: String. The name of the product that defined this permission
  2. name: String. The name of the permission
  3. desc: String. The description of the permission

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.
      });
});