Create resource IDs to access control custom pages or actions that you added to Order Hub. If you do not create resource IDs, then all your users can access the custom
applications. For example, consider a scenario where you created a page specifically for managers.
You can create a resource ID for the page, and then grant permission for managers but deny
permission for everyone else.
As a reference, the following tutorial creates resource permissions for custom pages and actions:
Tutorial: Customizing the Inventory search results page.
Before you begin
Ensure that the following property is enabled,
yfs.enable.resource.addition. You can set this property by using the System Management
Administrator or in the customer_overrides.properties file.
Procedure
-
Create resource IDs for your custom application. You can define the granularity of your
resources as needed.
For example, create resource IDs for an entire page, sections of a page, or specific
actions on a page.
-
Log in to the IBM Sterling® Order Management System
Application
Console.
-
Select .
-
Expand Extend and Customize the Application and then click
Define Extended Application Resources.
-
Select BUC_Product_Name (BUCSYS00001) from the menu.
This application represents Order Hub and all of its existing resource
IDs.
-
Click Create (+) to create a new entity.
Create as many entities as you need. For example, one entity for each page or action that
you want to access control.
-
Complete the mandatory fields and then click Save.
- Resource ID
- The ID of the resource. In step 2, you need to specify this
ID in your application code to perform resource permission checks.
- Description
- A description of the resource.
- Resource type
- The type of resource.
- Application
- The application that uses the resource. Select the application code buc
from the list.
For more information about resources, see
Sterling Order Management resources.
Tip: If you want to use
Applications Manager instead of
Channel Applications
Manager, you can access the resources at the following location.
- Log in to the Starting the Applications Manager.
- Select .
- Expand and then open Resources.
- Continue with step 1.d.
-
Perform resource permission check within your application.
-
Edit the <routing_file>.module.ts files as
follows.
- Update code to use the
BucCommonClassesConnectorResourcePermissionsGuard
guard with the data.id
attribute.
- In the
data.id
field, specify the Resource
ID value that was defined in step 1.f.
Order Hub will evaluate the resource permissions when a user attempts to access the
route.
For example, assuming the existing code looks similar to the following snippet:
{
path: 'omshome',
component: OMSHomeComponent
},
Add the
import,
canActivate, and
data code to your
file:
import { BucCommonClassesConnectorResourcePermissionsGuard } from '@buc/svc-angular';
...
{
canActivate: [BucCommonClassesConnectorResourcePermissionsGuard],
path: 'omshome',
component: OMSHomeComponent,
data: {
id: 'CUSTOM0001'
}
},
-
Add the resource permission check for your route by adding the following const
canAccess line to the other .ts files as needed.
const canAccess = BucSvcAngularStaticAppInfoFacadeUtil.canUserAccessResource(<resourceId>);
-
The resource IDs are now available in the Order Hub permissions module within
the Applications Manager. You can now give user groups access to the resource IDs that
you created.