added roles and organizations
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-15 20:59:32 -07:00
parent 2ca3860557
commit 177f122c10
57 changed files with 6378 additions and 247 deletions
+45
View File
@@ -0,0 +1,45 @@
<?php
namespace App;
enum WorkspaceType: string
{
case Personal = 'personal';
case Family = 'family';
case Organization = 'organization';
/**
* Get the human-friendly label for the workspace type.
*/
public function label(): string
{
return match ($this) {
self::Personal => 'Personal',
self::Family => 'Family',
self::Organization => 'Organization',
};
}
/**
* Get the visibility a new top-level folder receives by default in this
* kind of workspace. Personal workspaces are single-user, so their folders
* start private; family and organization folders are shared with every
* member until an admin narrows them.
*/
public function defaultFolderVisibility(): FolderVisibility
{
return match ($this) {
self::Personal => FolderVisibility::Private,
self::Family, self::Organization => FolderVisibility::Workspace,
};
}
/**
* Determine whether folders in this workspace are shared with members by
* default.
*/
public function sharesByDefault(): bool
{
return $this !== self::Personal;
}
}