fix manage menu permissions
This commit is contained in:
parent
a463334c94
commit
1edd696bdb
@ -98,11 +98,18 @@ export class AppComponent implements OnInit {
|
||||
}
|
||||
|
||||
async onNodeMenuClick($event) {
|
||||
console.log(this.menuTarget)
|
||||
let canManage = this.menuTarget.data.level === 'manage';
|
||||
if ( !canManage ) {
|
||||
if ( !this.menuTarget.data.level ) {
|
||||
canManage = true;
|
||||
}
|
||||
}
|
||||
const popover = await this.popover.create({
|
||||
component: OptionMenuComponent,
|
||||
componentProps: {
|
||||
menuItems: [
|
||||
...(this.menuTarget.data.level !== 'manage' ? [] : [{name: 'Share Sub-Tree', icon: 'person-add', value: 'share'}]),
|
||||
...(!canManage ? [] : [{name: 'Share Sub-Tree', icon: 'person-add', value: 'share'}]),
|
||||
],
|
||||
},
|
||||
event: $event,
|
||||
|
Loading…
Reference in New Issue
Block a user