wip RBAC
This commit is contained in:
parent
787ba267d8
commit
dce7af78b9
@ -6,6 +6,8 @@ enum Permission: string
|
||||
{
|
||||
case StudyMetadataView = 'study_metadata_view';
|
||||
case StudyMetadataEdit = 'study_metadata_edit';
|
||||
case StudyHistoryView = 'study_history_view';
|
||||
case StudyHistoryEdit = 'study_history_edit';
|
||||
case StudyDownload = 'study_download';
|
||||
case StudyDelete = 'study_delete';
|
||||
case StudyArchive = 'study_archive';
|
||||
|
@ -30,13 +30,18 @@ class User extends Authenticatable
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'is_active',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'display_name',
|
||||
'username',
|
||||
'email',
|
||||
'phone',
|
||||
'role',
|
||||
'site_id',
|
||||
'facility_id',
|
||||
'profile_photo_path',
|
||||
'timezone',
|
||||
'last_seen_at',
|
||||
'password',
|
||||
];
|
||||
|
||||
@ -69,7 +74,9 @@ class User extends Authenticatable
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'is_active' => 'bool',
|
||||
'email_verified_at' => 'datetime',
|
||||
'last_seen_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
|
@ -2,33 +2,33 @@
|
||||
|
||||
namespace App\Services\Pacs;
|
||||
|
||||
use Spatie\Url\Url;
|
||||
use Uri;
|
||||
|
||||
final class PacsUrlGen
|
||||
{
|
||||
public static function stoneViewer(string $study_uid): string
|
||||
{
|
||||
$url = Url::fromString(config('pacs.viewer.stone.endpoint'))
|
||||
$url = Uri::of(config('pacs.viewer.stone.endpoint'))
|
||||
->withPath('/stone-webviewer/index.html')
|
||||
->withQueryParameters(['study' => $study_uid]);
|
||||
->withQuery(['study' => $study_uid]);
|
||||
|
||||
return (string) $url;
|
||||
}
|
||||
|
||||
public static function ohifViewer(string $study_uid): string
|
||||
{
|
||||
$url = Url::fromString(config('pacs.viewer.ohif.endpoint'))
|
||||
$url = Uri::of(config('pacs.viewer.ohif.endpoint'))
|
||||
->withPath('/ohif/viewer')
|
||||
->withQueryParameters(['StudyInstanceUIDs' => $study_uid]);
|
||||
->withQuery(['StudyInstanceUIDs' => $study_uid]);
|
||||
|
||||
return (string) $url;
|
||||
}
|
||||
|
||||
public static function ohifViewerMpr(string $study_uid): string
|
||||
{
|
||||
$url = Url::fromString(config('pacs.viewer.ohif.endpoint'))
|
||||
$url = Uri::of(config('pacs.viewer.ohif.endpoint'))
|
||||
->withPath('/ohif/viewer')
|
||||
->withQueryParameters([
|
||||
->withQuery([
|
||||
'hangingprotocolId' => 'mprAnd3DVolumeViewport',
|
||||
'StudyInstanceUIDs' => $study_uid,
|
||||
]);
|
||||
@ -38,16 +38,16 @@ public static function ohifViewerMpr(string $study_uid): string
|
||||
|
||||
public static function ohifSegmentation(string $study_uid): string
|
||||
{
|
||||
$url = Url::fromString(config('pacs.viewer.ohif.endpoint'))
|
||||
$url = Uri::of(config('pacs.viewer.ohif.endpoint'))
|
||||
->withPath('/ohif/segmentation')
|
||||
->withQueryParameters(['StudyInstanceUIDs' => $study_uid]);
|
||||
->withQuery(['StudyInstanceUIDs' => $study_uid]);
|
||||
|
||||
return (string) $url;
|
||||
}
|
||||
|
||||
public static function archive(string $study_uid): string
|
||||
{
|
||||
$url = Url::fromString(config('pacs.api.endpoint'))
|
||||
$url = Uri::of(config('pacs.api.endpoint'))
|
||||
->withPath('/studies/'.$study_uid.'/archive');
|
||||
|
||||
return (string) $url;
|
||||
|
@ -22,7 +22,6 @@
|
||||
"rawilk/laravel-settings": "^3.4",
|
||||
"sentry/sentry-laravel": "^4.10",
|
||||
"spatie/laravel-permission": "^6.10",
|
||||
"spatie/url": "^2.4",
|
||||
"vinkla/hashids": "^12.0",
|
||||
"yajra/laravel-datatables-oracle": "^11.1"
|
||||
},
|
||||
|
@ -29,6 +29,7 @@ public function run(): void
|
||||
Permission::ReportDownload,
|
||||
Permission::StudyDownload,
|
||||
Permission::StudyMetadataView,
|
||||
Permission::StudyHistoryView,
|
||||
Permission::StudyNotesCreate,
|
||||
Permission::StudyNotesView,
|
||||
Permission::AttachmentDownload,
|
||||
@ -38,6 +39,8 @@ public function run(): void
|
||||
Permission::StudyDownload,
|
||||
Permission::StudyMetadataView,
|
||||
Permission::StudyMetadataEdit,
|
||||
Permission::StudyHistoryView,
|
||||
Permission::StudyHistoryEdit,
|
||||
Permission::StudyNotesCreate,
|
||||
Permission::StudyNotesView,
|
||||
Permission::AttachmentUpload,
|
||||
|
Loading…
Reference in New Issue
Block a user