api-manager
api-manager copied to clipboard
Custom Policies Option Shown for Tenant Admins
Description
The "Custom Policies" section in the Admin portal should be hidden for tenant admin users and only visible to super tenant admins.
This is suspected to be a UI issue. Access to policies for tenant admins has been restricted at the API level, and the error log below appears when attempting to load the UI.
The correct behavior can be observed in the APIM 4.3.0 pack.
Steps to Reproduce
- On 4.4.0 alpha pack create a tenant
- Login to admin portal with the admin user of above tenant
- Go to "Custom Policies" section, the below error will be logged
Affected Component
APIM
Version
4.4.0-alpha
Environment Details (with versions)
No response
Relevant Log Output
ERROR - ThrottlingApiServiceImpl You are not allowed to access this resource
org.wso2.carbon.apimgt.api.APIManagementException: Tenant test.com is not allowed to access custom rules. Only super tenant is allowed
at org.wso2.carbon.apimgt.rest.api.admin.v1.impl.ThrottlingApiServiceImpl.checkTenantDomainForCustomRules(ThrottlingApiServiceImpl.java:1604) ~[?:?]
at org.wso2.carbon.apimgt.rest.api.admin.v1.impl.ThrottlingApiServiceImpl.throttlingPoliciesCustomGet(ThrottlingApiServiceImpl.java:907) ~[?:?]
Related Issues
No response
Suggested Labels
No response