Skip to content

Instantly share code, notes, and snippets.

@markadrake
Created March 28, 2025 06:05
Show Gist options
  • Save markadrake/5cbaca3745770a52031a22554c2fea84 to your computer and use it in GitHub Desktop.
Save markadrake/5cbaca3745770a52031a22554c2fea84 to your computer and use it in GitHub Desktop.
Create New Permissions for User Groups (Umbraco 15)

Create New Permissions for User Groups (Umbraco 15)

I'm not sure if "My Package" is translateable.

image

image

export default {
actionCategories: {
myActionGroup: "My Action Group",
},
companyPackageActions: {
add: "Add",
subtract: "Subtract"
},
companyPackageActionDescriptions: {
add: "Allow users to add something.",
subtract: "Allow users to subtract something."
}
};
/** @type {Array<ManifestEntityUserPermission>} */
export const manifests= [
{
type: "entityUserPermission",
alias: "COMPANY_PACKAGE_UNIQUE_ALIAS_1",
name: "add",
forEntityTypes: [ "My Package" ],
weight: 100,
meta: {
verbs: ["Company.Package.Add"],
label: "#companyPackageActions_add",
description: "#companyPackageActionDescriptions_add",
group: "myActionGroup"
}
},
{
type: "entityUserPermission",
alias: "COMPANY_PACKAGE_UNIQUE_ALIAS_2",
name: "subtract",
forEntityTypes: [ "My Package" ],
weight: 100,
meta: {
verbs: ["Company.Package.Subtract"],
label: "#companyPackageActions_subtract",
description: "#companyPackageActionDescriptions_subtract",
group: "myActionGroup"
}
}
];
{
"name": "Company.Package",
"version": "15.0.0.0",
"extensions": [
{
"type": "bundle",
"alias": "Company.Package.Bundle",
"name": "Company Package Bundle",
"js": "/App_Plugins/Company/Package/permissions.js"
},
{
"type": "localization",
"alias": "Company.Package.Localize.En",
"name": "English",
"meta": {
"culture": "en"
},
"js": "/App_Plugins/Company/Package/Localization/en.js"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment