fix(plugin-export): allow to configure in acl
This commit is contained in:
parent
f97b72dc55
commit
5e116af4a9
@ -2,7 +2,7 @@ export interface AvailableActionOptions {
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
type: 'new-data' | 'old-data';
|
||||
type?: 'new-data' | 'old-data';
|
||||
displayName?: string;
|
||||
aliases?: string[] | string;
|
||||
resource?: string;
|
||||
|
@ -9,15 +9,11 @@ export class ExportPlugin extends Plugin {
|
||||
beforeLoad() {}
|
||||
|
||||
async load() {
|
||||
// Visit: http://localhost:13000/api/xxx:exportXlsx
|
||||
this.app.resourcer.registerActionHandler('exportXlsx', exportXlsx);
|
||||
// this.app.resource({
|
||||
// name: 'export',
|
||||
// actions: {
|
||||
// xlsx: exportXlsx,
|
||||
// },
|
||||
// });
|
||||
this.app.acl.allow('*', 'exportXlsx');
|
||||
this.app.acl.setAvailableAction('exportXlsx', {
|
||||
displayName: '{{t("Export")}}',
|
||||
allowConfigureFields: true,
|
||||
});
|
||||
}
|
||||
|
||||
async install(options: InstallOptions) {}
|
||||
|
Loading…
Reference in New Issue
Block a user