Merge branch 'develop' into features/auto_add_to_fieldset

This commit is contained in:
snipe 2023-04-25 21:31:50 -07:00
commit 27477085fe
4 changed files with 10 additions and 7 deletions

View file

@ -76,7 +76,7 @@ jobs:
with: with:
context: . context: .
file: ./Dockerfile.alpine file: ./Dockerfile.alpine
platforms: linux/amd64 platforms: linux/amd64,linux/arm64
# For pull requests, we run the Docker build (to ensure no PR changes break the build), # For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR # but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}

View file

@ -76,7 +76,7 @@ jobs:
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
platforms: linux/amd64 platforms: linux/amd64,linux/arm64
# For pull requests, we run the Docker build (to ensure no PR changes break the build), # For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR # but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}

View file

@ -70,7 +70,11 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig
// Map a SCIM attribute to an attribute of the object. // Map a SCIM attribute to an attribute of the object.
'mapping' => [ 'mapping' => [
'id' => AttributeMapping::eloquent("id")->disableWrite(), 'id' => (new AttributeMapping())->setRead(
function (&$object) {
return (string)$object->id;
}
)->disableWrite(),
'externalId' => AttributeMapping::eloquent('scim_externalid'), // FIXME - I have a PR that changes a lot of this. 'externalId' => AttributeMapping::eloquent('scim_externalid'), // FIXME - I have a PR that changes a lot of this.
@ -174,7 +178,6 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig
'$ref' => null, '$ref' => null,
'display' => null, 'display' => null,
'type' => null, 'type' => null,
'type' => null
]], ]],
'entitlements' => null, 'entitlements' => null,

View file

@ -12,7 +12,7 @@ class UpdateUserTest extends TestCase
public function testUsersCanBeActivated() public function testUsersCanBeActivated()
{ {
$admin = User::factory()->admin()->create(); $admin = User::factory()->superuser()->create();
$user = User::factory()->create(['activated' => false]); $user = User::factory()->create(['activated' => false]);
$this->actingAs($admin) $this->actingAs($admin)
@ -27,7 +27,7 @@ class UpdateUserTest extends TestCase
public function testUsersCanBeDeactivated() public function testUsersCanBeDeactivated()
{ {
$admin = User::factory()->admin()->create(); $admin = User::factory()->superuser()->create();
$user = User::factory()->create(['activated' => true]); $user = User::factory()->create(['activated' => true]);
$this->actingAs($admin) $this->actingAs($admin)
@ -44,7 +44,7 @@ class UpdateUserTest extends TestCase
public function testUsersUpdatingThemselvesDoNotDeactivateTheirAccount() public function testUsersUpdatingThemselvesDoNotDeactivateTheirAccount()
{ {
$admin = User::factory()->admin()->create(['activated' => true]); $admin = User::factory()->superuser()->create(['activated' => true]);
$this->actingAs($admin) $this->actingAs($admin)
->put(route('users.update', $admin), [ ->put(route('users.update', $admin), [