More changes to use form.select component. Re-engineered user BBS registration

This commit is contained in:
2024-12-06 08:33:24 +11:00
parent fd780d1756
commit e7336a942b
13 changed files with 253 additions and 422 deletions

View File

@@ -25,6 +25,13 @@ class SystemPolicy
{
use HandlesAuthorization;
public function admin(User $user, System $system): bool
{
// Site Admins can always create
// If it doesnt exist, then a user can create it.
return ($user->isAdmin() || (! $system->exists));
}
/**
* Determine whether the user can create the model.
*
@@ -70,9 +77,9 @@ class SystemPolicy
if ($user->isAdmin())
return TRUE;
// If it doesnt exist, then its a false.
// If it doesnt exist, then its a true (they are creating it).
if (! $system->exists)
return FALSE;
return TRUE;
// @todo Permit ZC, RC, NC, HUB user