Open BigNavid opened 2 weeks ago
If you are using CE version of TB, such limitation is by design. Tenant admins create and (un)assign device/asset, customer user use (or view) them.
Hi @BigNavid,
As @devaskim said it is the expected behavior for ThinsBoard since the customer user has only read permission for Asset Type.
In case you are using ThingsBoard PE you can add permissions for customer user in the Security settings, so the user would be able to add Assets.
In order to do it you need to do the following:
Resource | Operations |
---|---|
Asset | Create / Read/Write |
Asset Group | Add to group / Create / Read / Write |
Asset Profile | Read |
Customer | Read |
After all these steps you should be able to add Assets from the customer user.
Component
Description I'm attempting to add an asset using assetService. It works perfectly when I log in with a tenant account, but when I try to do the same with a customer account, the assetService returns a 403 error, indicating I don't have permission to perform this action. However, according to the swagger documentation for the saveAsset method, it should be "Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority."
Here is the code for my custom action to save an asset: