Skip to content

Commit

Permalink
feat: add business rules for site's followers pane
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannemarik committed Aug 24, 2023
1 parent 7c200c8 commit 099015e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions packages/common/src/sites/_internal/SiteBusinessRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export const SitePermissions = [
"hub:site:workspace:collaborators",
"hub:site:workspace:content",
"hub:site:workspace:metrics",
"hub:site:workspace:followers",
"hub:site:workspace:followers:member",
"hub:site:workspace:followers:admin",
] as const;

/**
Expand Down Expand Up @@ -107,6 +110,32 @@ export const SitesPermissionPolicies: IPermissionPolicy[] = [
dependencies: ["hub:site:edit"],
environments: ["devext", "qaext"],
},
{
permission: "hub:site:workspace:followers",
dependencies: ["hub:site:edit"],
},
{
permission: "hub:site:workspace:followers:member",
dependencies: ["hub:site:workspace:followers"],
assertions: [
{
property: "context:currentUser",
type: "is-group-member",
value: "entity:followersGroupId",
},
],
},
{
permission: "hub:site:workspace:followers:admin",
dependencies: ["hub:site:workspace:followers"],
assertions: [
{
property: "context:currentUser",
type: "is-group-admin",
value: "entity:followersGroupId",
},
],
},
];

/**
Expand Down

0 comments on commit 099015e

Please sign in to comment.