0
shobhit created
2 Answer(s)
-
0
In the above example we have to hide "Claims" action
-
0
The identity module has extensible system feature. So you can override entity_actions.
import { EntityAction, EntityActionList } from '@abp/ng.theme.shared/extensions'; import { IdentityEntityActionContributors, UsersComponent } from '@volo/abp.ng.identity'; import { IdentityUserDto } from '@volo/abp.ng.identity/proxy'; const claimsModal = new EntityAction<IdentityUserDto>({ text: 'AbpIdentity::Claims', action: data => { const component = data.getInjected(UsersComponent); component.openPermissionsModal(data.record.id, data.record.userName); }, permission: 'MyCustomPermissionToken', visible: data => true // implement your custom logic }); export function claimsModalContributor(actionList: EntityActionList<IdentityUserDto>) { const index = actionList.indexOf( 'AbpIdentity::Claims', (action, text) => action.text === text, ); actionList.dropByIndex(index); actionList.addByIndex(claimsModal, index); } export const identityEntityActionContributors: IdentityEntityActionContributors = { 'Identity.UsersComponent': [claimsModalContributor], };
See the detail. https://docs.abp.io/en/abp/latest/UI/Angular/Dynamic-Form-Extensions