Skip to content
Snippets Groups Projects
Commit 3a24554b authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #11882 TIME 0:10 check privilege menu history

parent 625675d4
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ import { MatSidenav } from '@angular/material/sidenav';
import { AppService } from '../../../service/app.service';
import { FunctionsService } from '../../../service/functions.service';
import { HistoryComponent } from '../../history/history.component';
import { PrivilegeService } from '../../../service/privileges.service';
@Component({
selector: 'contact-list',
......@@ -42,7 +43,34 @@ export class HistoryAdministrationComponent implements OnInit {
constructor(
public http: HttpClient,
public appService: AppService,
public functions: FunctionsService) { }
public functions: FunctionsService,
private privilegeService: PrivilegeService) { }
ngOnInit(): void { }
ngOnInit(): void {
if (this.privilegeService.hasCurrentUserPrivilege('view_history_batch')) {
this.subMenus = [
{
icon: 'fa fa-history',
route: '/administration/history',
label: this.lang.history,
current: false
},
{
icon: 'fa fa-history',
route: '/administration/history-batch',
label: this.lang.historyBatch,
current: true
}
];
} else {
this.subMenus = [
{
icon: 'fa fa-history',
route: '/administration/history-batch',
label: this.lang.historyBatch,
current: true
}
];
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment