-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* FIx date response * Add generate plugin settings. * bump version * Hide Plugin Settings from users. * fix bug.
- Loading branch information
Showing
10 changed files
with
99 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { PLUGIN_ID } from "./pluginId"; | ||
export const PERMISSIONS = { | ||
// This permission regards the main component (App) and is used to tell | ||
// If the plugin link should be displayed in the menu | ||
// And also if the plugin is accessible. This use case is found when a user types the url of the | ||
// plugin directly in the browser | ||
settings: [ | ||
{ action: `plugin::${PLUGIN_ID}.admin`, subject: null }, | ||
|
||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
import type { Core } from '@strapi/strapi'; | ||
import { PLUGIN_ID } from './pluginId'; | ||
|
||
const bootstrap = ({ strapi }: { strapi: Core.Strapi }) => { | ||
const bootstrap = async ({ strapi }: { strapi: Core.Strapi }) => { | ||
// bootstrap phase | ||
await registerPermissionActions(); | ||
}; | ||
const registerPermissionActions = async () => { | ||
const actions = [ | ||
{ | ||
section: 'plugins', | ||
displayName: 'Generate PDF from templates', | ||
uid: 'generate', | ||
pluginName: PLUGIN_ID, | ||
}, | ||
{ | ||
section: 'plugins', | ||
displayName: 'Manage plugin Settings', | ||
uid: 'admin', | ||
pluginName: PLUGIN_ID, | ||
} | ||
]; | ||
|
||
await strapi.service('admin::permission').actionProvider.registerMany(actions); | ||
}; | ||
|
||
export default bootstrap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
export default { | ||
default: {}, | ||
default: { | ||
enabled: true, | ||
beautifyDate: { | ||
fields: [], | ||
options: {} | ||
}, | ||
}, | ||
validator() {}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters