refactor: remove if curly

pull/4788/head
mehmet-erim 5 years ago
parent 3d7a385ff8
commit 6cde48f1bf

@ -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