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
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
type: 'new-data' | 'old-data';
|
type?: 'new-data' | 'old-data';
|
||||||
displayName?: string;
|
displayName?: string;
|
||||||
aliases?: string[] | string;
|
aliases?: string[] | string;
|
||||||
resource?: string;
|
resource?: string;
|
||||||
|
@ -9,15 +9,11 @@ export class ExportPlugin extends Plugin {
|
|||||||
beforeLoad() {}
|
beforeLoad() {}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
// Visit: http://localhost:13000/api/xxx:exportXlsx
|
|
||||||
this.app.resourcer.registerActionHandler('exportXlsx', exportXlsx);
|
this.app.resourcer.registerActionHandler('exportXlsx', exportXlsx);
|
||||||
// this.app.resource({
|
this.app.acl.setAvailableAction('exportXlsx', {
|
||||||
// name: 'export',
|
displayName: '{{t("Export")}}',
|
||||||
// actions: {
|
allowConfigureFields: true,
|
||||||
// xlsx: exportXlsx,
|
});
|
||||||
// },
|
|
||||||
// });
|
|
||||||
this.app.acl.allow('*', 'exportXlsx');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async install(options: InstallOptions) {}
|
async install(options: InstallOptions) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user