Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The permission API exposes a number of methods to analyze the access rights of a given suer. These methods assist extension developers to secure their resources.

Methods nameDescriptionExample
hasAssetPermission This method is used to check specific asset type permissions.
  • hasAssetPermission(‘ASSET_CREATE’,’gadget’,session);
  • hasAssetPermission(‘ASSET_CREATE’,’gadget’,tenantId,username);

If you wish to check the asset type permission of another user, use the second example given as you need to define the tenantId and the username of the specific user.

hasAppPermission

This method is used to check permissions which are independent of the asset type.

Example:

Verify if you have permission to access the My Items page.

  • hasAppPermission(‘APP_MYITEMS’,session);
  • hasAppPermission(‘APP_MYITEMS’,tenantId,username);

If you wish to check the asset type permission of another user, use the second example given as you need to define the tenantId and the username of the specific user.


   
   
   
   
   
   
  • No labels