refactor(permissions): drop explanatory comments, fix stale PostPolicy docblock
This commit is contained in:
parent
5bb39da598
commit
0eb6f4df24
3 changed files with 2 additions and 5 deletions
|
|
@ -25,7 +25,8 @@ public function view(User $user, Post $post): bool|Response
|
|||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -119,7 +119,6 @@ const workspaceNavItems = computed<NavItem[]>(() => [
|
|||
href: accounts.url(),
|
||||
icon: IconAffiliate,
|
||||
},
|
||||
// Signatures / labels / assets are content-authoring tools (member+ only).
|
||||
...(canCreatePost.value
|
||||
? [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue