mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 19:21:33 +00:00
update dockerfiles based on latest streamline image
The latest images incorporate all changes previously added by the dockerfiles. The arm image however is still missing/unreliable from the registry and must be built independently.
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Permission\Exceptions;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
use InvalidArgumentException;
|
||||
|
||||
class GuardDoesNotMatch extends InvalidArgumentException
|
||||
{
|
||||
public static function create(string $givenGuard, Collection $expectedGuards)
|
||||
{
|
||||
return new static("The given role or permission should use guard `{$expectedGuards->implode(', ')}` instead of `{$givenGuard}`.");
|
||||
}
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Permission\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
class PermissionAlreadyExists extends InvalidArgumentException
|
||||
{
|
||||
public static function create(string $permissionName, string $guardName)
|
||||
{
|
||||
return new static("A `{$permissionName}` permission already exists for guard `{$guardName}`.");
|
||||
}
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Permission\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
class PermissionDoesNotExist extends InvalidArgumentException
|
||||
{
|
||||
public static function create(string $permissionName, string $guardName = '')
|
||||
{
|
||||
return new static("There is no permission named `{$permissionName}` for guard `{$guardName}`.");
|
||||
}
|
||||
|
||||
public static function withId(int $permissionId, string $guardName = '')
|
||||
{
|
||||
return new static("There is no [permission] with id `{$permissionId}` for guard `{$guardName}`.");
|
||||
}
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Permission\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
class RoleAlreadyExists extends InvalidArgumentException
|
||||
{
|
||||
public static function create(string $roleName, string $guardName)
|
||||
{
|
||||
return new static("A role `{$roleName}` already exists for guard `{$guardName}`.");
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Permission\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
class RoleDoesNotExist extends InvalidArgumentException
|
||||
{
|
||||
public static function named(string $roleName)
|
||||
{
|
||||
return new static("There is no role named `{$roleName}`.");
|
||||
}
|
||||
|
||||
public static function withId(int $roleId)
|
||||
{
|
||||
return new static("There is no role with id `{$roleId}`.");
|
||||
}
|
||||
}
|
||||
Vendored
+69
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Permission\Exceptions;
|
||||
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
class UnauthorizedException extends HttpException
|
||||
{
|
||||
private $requiredRoles = [];
|
||||
|
||||
private $requiredPermissions = [];
|
||||
|
||||
public static function forRoles(array $roles): self
|
||||
{
|
||||
$message = 'User does not have the right roles.';
|
||||
|
||||
if (config('permission.display_role_in_exception')) {
|
||||
$message .= ' Necessary roles are '.implode(', ', $roles);
|
||||
}
|
||||
|
||||
$exception = new static(403, $message, null, []);
|
||||
$exception->requiredRoles = $roles;
|
||||
|
||||
return $exception;
|
||||
}
|
||||
|
||||
public static function forPermissions(array $permissions): self
|
||||
{
|
||||
$message = 'User does not have the right permissions.';
|
||||
|
||||
if (config('permission.display_permission_in_exception')) {
|
||||
$message .= ' Necessary permissions are '.implode(', ', $permissions);
|
||||
}
|
||||
|
||||
$exception = new static(403, $message, null, []);
|
||||
$exception->requiredPermissions = $permissions;
|
||||
|
||||
return $exception;
|
||||
}
|
||||
|
||||
public static function forRolesOrPermissions(array $rolesOrPermissions): self
|
||||
{
|
||||
$message = 'User does not have any of the necessary access rights.';
|
||||
|
||||
if (config('permission.display_permission_in_exception') && config('permission.display_role_in_exception')) {
|
||||
$message .= ' Necessary roles or permissions are '.implode(', ', $rolesOrPermissions);
|
||||
}
|
||||
|
||||
$exception = new static(403, $message, null, []);
|
||||
$exception->requiredPermissions = $rolesOrPermissions;
|
||||
|
||||
return $exception;
|
||||
}
|
||||
|
||||
public static function notLoggedIn(): self
|
||||
{
|
||||
return new static(403, 'User is not logged in.', null, []);
|
||||
}
|
||||
|
||||
public function getRequiredRoles(): array
|
||||
{
|
||||
return $this->requiredRoles;
|
||||
}
|
||||
|
||||
public function getRequiredPermissions(): array
|
||||
{
|
||||
return $this->requiredPermissions;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Permission\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
class WildcardPermissionInvalidArgument extends InvalidArgumentException
|
||||
{
|
||||
public static function create()
|
||||
{
|
||||
return new static('Wildcard permission must be string, permission id or permission instance');
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Permission\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
class WildcardPermissionNotImplementsContract extends InvalidArgumentException
|
||||
{
|
||||
public static function create()
|
||||
{
|
||||
return new static('Wildcard permission class must implements Spatie\Permission\Contracts\Wildcard contract');
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Permission\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
class WildcardPermissionNotProperlyFormatted extends InvalidArgumentException
|
||||
{
|
||||
public static function create(string $permission)
|
||||
{
|
||||
return new static("Wildcard permission `{$permission}` is not properly formatted.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user