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