0

Is it possible to disable the ability to create applications for selected users? I know that I can use application creation workflow, but then approval task will be created, is there any other way to do it?
Gregory
  • 41
  • 5

2 Answers2

0

You can achieve this by changing the scopes assigned to that particular user's role from the Admin portal. For example, the default Internal/subscriber role has apim:app_manage scope assigned. But if you remove this scope from Internal/subscriber, the users will not be able to do CRUD operations on applications.

So similarly, you can create a custom role and assign the required scopes to that role and assign that to the user to achieve your requirement.

Please refer [1] for all available scopes and their usages.

[1] - https://apim.docs.wso2.com/en/latest/administer/managing-users-and-roles/managing-permissions/#adding-api-m-specific-scope-assignments

RrR-
  • 1,251
  • 3
  • 15
  • 32
  • I tried this solution and unfortunately it doesn't work. I created a new role called sub in the /carbon portal. Then in the admin portal I added a new scope mapping with the name sub and custom scope assignments: Subscribe API(apim:subscribe). I assigned the sub role to the user in the carbon portal. After logging into devportal, I can create a new app. – Gregory Feb 28 '23 at 10:22
0

You can just hide the Application creation button(For all users) from the dev portal UI using the dev portal customization[1].(By doing this you are only hiding the UI functionality and still, this can achievable using REST APIs).

Follow the below steps to achieve the use case.

  1. To hide the Add New Application button, add the display: 'none' property to the [2] createLinkWrapper class which holds the button.
    createLinkWrapper: {
            paddingLeft: theme.spacing(2),
            display: 'none',
    }

  1. Then built the changes following [1] and deployed the changes and then Add New Application button will be hidden.

[1] https://apim.docs.wso2.com/en/latest/reference/customize-product/customizations/advanced-ui-customization/#publisher-and-developer-portal-advanced-ui-customizations

[2] https://github.com/wso2/apim-apps/blob/v9.0.311/portals/devportal/source/src/app/components/Applications/Listing/Listing.jsx#L137

chashikajw
  • 592
  • 5
  • 18