Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

refactor(permissions): drop explanatory comments, fix stale PostPolicy docblock

Paulo Castellano0eb6f4df24dd
diff --git a/app/Policies/PostPolicy.php b/app/Policies/PostPolicy.php
index e542176b5..0949d8129 100644
--- a/app/Policies/PostPolicy.php
+++ b/app/Policies/PostPolicy.php
@@ -25,7 +25,8 @@ class PostPolicy
}
/**
- * Authorize updating a post. Same workspace-tenancy guard as `view`.
+ * Authorize updating a post: tenancy guard (404 across tenants) then the
+ * role gate — viewers are read-only (403).
*/
public function update(User $user, Post $post): bool|Response
{
diff --git a/resources/js/components/AppSidebar.vue b/resources/js/components/AppSidebar.vue
index 971cdc732..81f506729 100644
--- a/resources/js/components/AppSidebar.vue
+++ b/resources/js/components/AppSidebar.vue
@@ -119,7 +119,6 @@ const workspaceNavItems = computed<NavItem[]>(() => [
href: accounts.url(),
icon: IconAffiliate,
},
- // Signatures / labels / assets are content-authoring tools (member+ only).
...(canCreatePost.value
? [
{
diff --git a/resources/js/composables/useWorkspaceRole.ts b/resources/js/composables/useWorkspaceRole.ts
index a4a34fd31..52ae869ed 100644
--- a/resources/js/composables/useWorkspaceRole.ts
+++ b/resources/js/composables/useWorkspaceRole.ts
@@ -28,14 +28,11 @@ export const useWorkspaceRole = () => {
isOwner,
isAdminOrAbove,
isMemberOrAbove,
- // member+ (owner/admin/member) — content authoring
canCreatePost: isMemberOrAbove,
canManageAutomations: isMemberOrAbove,
- // admin+ (owner/admin) — workspace administration
canManageAccounts: isAdminOrAbove,
canManageTeam: isAdminOrAbove,
canManageWorkspace: isAdminOrAbove,
- // owner only
canManageBilling: isOwner,
canCreateWorkspace: isOwner,
};