tachybase_todo/packages/server/src/acl/available-action.ts
2022-02-26 23:03:58 +08:00

40 lines
823 B
TypeScript

import { AvailableActionOptions } from '@nocobase/acl';
const availableActions: {
[key: string]: AvailableActionOptions;
} = {
create: {
displayName: '{{t("Add new")}}',
type: 'new-data',
onNewRecord: true,
allowConfigureFields: true,
},
// import: {
// displayName: '{{t("Import")}}',
// type: 'new-data',
// scope: false,
// },
export: {
displayName: '{{t("Export")}}',
type: 'old-data',
allowConfigureFields: true,
},
view: {
displayName: '{{t("View")}}',
type: 'old-data',
aliases: ['get', 'list'],
allowConfigureFields: true,
},
update: {
displayName: '{{t("Edit")}}',
type: 'old-data',
allowConfigureFields: true,
},
destroy: {
displayName: '{{t("Delete")}}',
type: 'old-data',
},
};
export { availableActions };