Fixed permission names in front end as they have to be kebab cased
This commit is contained in:
@@ -14,7 +14,6 @@ import {ToasterService} from '../core/toaster.service';
|
||||
import {debounceTime, distinctUntilChanged, map, startWith, switchMap} from 'rxjs/operators';
|
||||
import {Employee} from '../employee/employee';
|
||||
import {EmployeeService} from '../employee/employee.service';
|
||||
import {Account} from '../core/account';
|
||||
|
||||
@Component({
|
||||
selector: 'app-employee-benefits',
|
||||
@@ -171,10 +170,10 @@ export class EmployeeBenefitsComponent implements OnInit, AfterViewInit {
|
||||
canSave() {
|
||||
if (!this.voucher.id) {
|
||||
return true;
|
||||
} else if (this.voucher.posted && this.auth.user.perms.indexOf('Edit Posted Vouchers') !== -1) {
|
||||
} else if (this.voucher.posted && this.auth.user.perms.indexOf('edit-posted-vouchers') !== -1) {
|
||||
return true;
|
||||
} else {
|
||||
return this.voucher.user.id === this.auth.user.id || this.auth.user.perms.indexOf('Edit Other User\'s Vouchers') !== -1;
|
||||
return this.voucher.user.id === this.auth.user.id || this.auth.user.perms.indexOf("edit-other-user's-vouchers") !== -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user