-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plugins/templates): add policies for templates
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { templates_add, templates_edit, templates_rm } from './policies'; | ||
|
||
export default { | ||
add: templates_add, | ||
edit: templates_edit, | ||
remove: templates_rm, | ||
}; | ||
|
||
export const map = [templates_add, templates_edit, templates_rm]; |
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,35 @@ | ||
/** | ||
* @file Policy Definition File | ||
* @description Policies Related to Adding and Modifying Templates | ||
* @module - Templates | ||
* @author Sudharshan TK | ||
*/ | ||
|
||
import { IPolicy } from '@models/policy/types'; | ||
import { objectID } from '@plugins/misc/uid'; | ||
|
||
const CODE = 'template'; | ||
|
||
export const templates_add: Readonly<IPolicy> = { | ||
_id: objectID('p'), | ||
code: `${CODE}add`, | ||
name: 'Add Templates to Database', | ||
message: 'Enable Adding of Templates to Database', | ||
global_flag: true, | ||
}; | ||
|
||
export const templates_edit: Readonly<IPolicy> = { | ||
_id: objectID('p'), | ||
code: `${CODE}edit`, | ||
name: 'Edit Templates', | ||
message: 'Enable Editing of Templates in Database', | ||
global_flag: true, | ||
}; | ||
|
||
export const templates_rm: Readonly<IPolicy> = { | ||
_id: objectID('p'), | ||
code: `${CODE}rm`, | ||
name: 'Remove Templates', | ||
message: 'Enable Removal of Templates from Database', | ||
global_flag: true, | ||
}; |