Merge pull request #4561 from GabrielInTheWorld/administration

Checks the permissions
This commit is contained in:
Emanuel Schütze 2019-04-04 23:02:22 +02:00 committed by GitHub
commit df915aad6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,12 +40,12 @@ export class MediafileListComponent extends ListViewBaseComponent<ViewMediafile,
/** /**
* Columns to display in Mediafile table when desktop view is available * 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 * 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 * Show or hide the edit mode
@ -279,6 +279,9 @@ export class MediafileListComponent extends ListViewBaseComponent<ViewMediafile,
if (this.isMultiSelect) { if (this.isMultiSelect) {
columns = ['selector'].concat(columns); columns = ['selector'].concat(columns);
} }
if (this.canEdit) {
columns = columns.concat(['menu']);
}
return columns; return columns;
} }