Open Closed

abp4.3 angular remove or hidden claims dropdownitem #1618


User avatar
0
zhangxd1222 created

hi,abp commercial I want to hide the dropdown button,so what should i do thank you!


3 Answer(s)
  • User Avatar
    2
    alper created
    Support Team Director

    1- you can add the source-code and remove the item also remove the backend code (hard) 2- you can use entity action extensions to hide it

  • User Avatar
    1
    bunyamin created

    Hello,

    As @albert suggested, you can utilize entity actions to remove whichever entity action you'd like.

    Follow the instructions in the docs with the following code.

    import {
      eIdentityComponents,
      IdentityEntityActionContributors,
      IdentityRoleDto,
    } from '@volo/abp.ng.identity';
    import { EntityActionList } from '@abp/ng.theme.shared/extensions';
    
    export function removeClaims(actionList: EntityActionList<IdentityRoleDto>) {
      actionList.dropByValue({ text: 'AbpIdentity::Claims' }, (v1, v2) => v1.text === v2.text);
    }
    
    export const identityEntityActionContributors: IdentityEntityActionContributors = {
      [eIdentityComponents.Roles]: [removeClaims],
    };
    

    Don't forget to pass this contributor to IdentityModule.forLazy in app-routing.module.ts as follows:

    import { identityEntityActionContributors } from './entity-action-contributors';
    
    
    // ...
      {
        path: 'identity',
        loadChildren: () =>
          import('@volo/abp.ng.identity').then(m =>
            m.IdentityModule.forLazy({
              entityActionContributors: identityEntityActionContributors,
            })
          ),
      },
    
    // ...
    
  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11