= feaa8b6c93 Feat: Add modular URL app creation with role-based access and Microsoft integration support
- Introduced `StoreURLAppForm` and `StoreURLAppData` for form handling and data transformation.
- Added `UrlAppService` to streamline URL app creation with settings like `accessUrl` and `isConnectedToMicrosoft`.
- Enhanced user access controls with role-based permissions using `UserAccessTypeEnum`.
- Updated UI for URL app creation with support for logos and dynamic role selection.
- Implemented feature tests to validate URL app creation and access URL formatting.
2026-06-22 07:21:26 +00:00

48 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\{Relations\BelongsTo, Relations\Pivot};
use Spatie\Permission\Models\Role;
/**
* @property int $id
* @property int $app_id
* @property int $role_id
* @property string $duration Validity of the role
* @property bool $is_unlimited Whether validity of the role is unlimited
*/
#[Fillable(['app_id', 'role_id', 'duration', 'is_unlimited'])]
class AppRole extends Pivot
{
public $timestamps = false;
protected $table = 'app_roles';
/**
* @return BelongsTo<ConnectedApp, $this>
*/
public function app(): BelongsTo
{
return $this->belongsTo(ConnectedApp::class, 'app_id');
}
/**
* @return BelongsTo<Role, $this>
*/
public function role(): BelongsTo
{
return $this->belongsTo(Role::class, 'role_id');
}
protected function casts(): array
{
return [
'is_unlimited' => 'boolean',
];
}
}