Browse Source

refactor: remove if curly

pull/4788/head
mehmet-erim 6 years ago
parent
commit
6cde48f1bf
  1. 8
      npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts

8
npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts

@ -280,13 +280,9 @@ export class PermissionManagementComponent
ConfigState.getOne('currentUser'),
) as ApplicationConfiguration.CurrentUser;
if (this.providerName === 'R') {
currentUser.roles.some(role => role === this.providerKey);
}
if (this.providerName === 'R') return currentUser.roles.some(role => role === this.providerKey);
if (this.providerName === 'U') {
return currentUser.id === this.providerKey;
}
if (this.providerName === 'U') return currentUser.id === this.providerKey;
return false;
}

Loading…
Cancel
Save