Checks the permissions

- If the user has not the permissions to edit mediafiles, than he cannot edit or delete any files.
This commit is contained in:
GabrielMeyer 2019-04-01 19:09:09 +02:00 committed by Sean Engelhardt
parent 864ab50306
commit 4cdd4b3c34

View File

@ -40,12 +40,12 @@ export class MediafileListComponent extends ListViewBaseComponent<ViewMediafile,
/**
* Columns to display in Mediafile table when desktop view is available
*/
public displayedColumnsDesktop: string[] = ['title', 'info', 'indicator', 'menu'];
public displayedColumnsDesktop: string[] = ['title', 'info', 'indicator'];
/**
* Columns to display in Mediafile table when mobile view is available
*/
public displayedColumnsMobile: string[] = ['title', 'menu'];
public displayedColumnsMobile: string[] = ['title'];
/**
* Show or hide the edit mode
@ -279,6 +279,9 @@ export class MediafileListComponent extends ListViewBaseComponent<ViewMediafile,
if (this.isMultiSelect) {
columns = ['selector'].concat(columns);
}
if (this.canEdit) {
columns = columns.concat(['menu']);
}
return columns;
}