-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create role in invite when registering new service
Prior to this change, the Service was registered in teams, which is going to be removed. This change registers the Service as a role in Invite, so an invite can be sent later. See https://www.pivotaltracker.com/story/show/188011488
- Loading branch information
Showing
26 changed files
with
818 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,13 +33,13 @@ surfconext_representative_authorization='urn:mace:surfnet.nl:surfnet.nl:sab:role | |
|
||
## Manage test instance | ||
manage_test_host='https://manage.dev.openconext.local' | ||
manage_test_username=sp-portal | ||
manage_test_username=sp-dashboard | ||
manage_test_password=secret | ||
manage_test_publication_status=testaccepted | ||
|
||
## Manage production instance | ||
manage_prod_host='https://manage.dev.openconext.local' | ||
manage_prod_username=sp-portal | ||
manage_prod_username=sp-dashboard | ||
manage_prod_password=secret | ||
manage_prod_publication_status=prodaccepted | ||
|
||
|
@@ -48,6 +48,13 @@ teams_host='https://teams.dev.openconext.local' | |
teams_username=spdashboard | ||
teams_password=secret | ||
|
||
## Invite instance | ||
invite_host='https://invite.dev.openconext.local' | ||
invite_api_username='sp_dashboard' | ||
invite_api_password='secret' | ||
invite_landing_url='https://example.org' | ||
invite_spdashboard_manage_id='4b0e422d-d0d0-4b9e-a521-fdd1ee5d2bad' | ||
|
||
# Mail default settings | ||
mail_from=[email protected] | ||
mail_receiver=[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,13 @@ teams_host='https://teams.dev.openconext.local' | |
teams_username=spdashboard | ||
teams_password=secret | ||
|
||
## Invite instance | ||
invite_host='https://invite.dev.openconext.local' | ||
invite_api_username='sp_dashboard' | ||
invite_api_password='secret' | ||
invite_landing_url='https://example.org' | ||
invite_spdashboard_manage_id='4b0e422d-d0d0-4b9e-a521-fdd1ee5d2bad' | ||
|
||
# Mail default settings | ||
[email protected] | ||
[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Surfnet\ServiceProviderDashboard\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20241029125655 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE service ADD invite_role_id INT DEFAULT NULL, DROP invite_urn'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE service DROP invite_role_id'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/Surfnet/ServiceProviderDashboard/Domain/Repository/InviteRepository.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2017 SURFnet B.V. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
namespace Surfnet\ServiceProviderDashboard\Domain\Repository; | ||
|
||
use Surfnet\ServiceProviderDashboard\Domain\ValueObject\CreateRoleResponse; | ||
use Surfnet\ServiceProviderDashboard\Infrastructure\HttpClient\Exceptions\RuntimeException\InviteException; | ||
|
||
interface InviteRepository | ||
{ | ||
/** | ||
* @throws InviteException | ||
*/ | ||
public function createRole( | ||
string $name, | ||
string $shortName, | ||
string $description, | ||
string $landingPage, | ||
string $manageId, | ||
): CreateRoleResponse; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,25 +20,6 @@ | |
|
||
interface PublishTeamsRepository | ||
{ | ||
/** | ||
* Create a new team in Teams. | ||
* | ||
* Expects an array with the following structure: | ||
* | ||
{ | ||
"name": "Champions ", | ||
"description": "Team champions", | ||
"personalNote": "Team created by SP Dashboard", | ||
"viewable": true, | ||
"emails": { | ||
"[email protected]": "ADMIN" | ||
}, | ||
"roleOfCurrentUser": "ADMIN", | ||
"invitationMessage": "Please..", | ||
"language": "DUTCH" | ||
} | ||
public function createTeam(array $team): mixed; | ||
/** | ||
* Change the membership role for a given id with a given role. | ||
*/ | ||
|
30 changes: 30 additions & 0 deletions
30
src/Surfnet/ServiceProviderDashboard/Domain/ValueObject/CreateRoleResponse.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2017 SURFnet B.V. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
namespace Surfnet\ServiceProviderDashboard\Domain\ValueObject; | ||
|
||
class CreateRoleResponse | ||
{ | ||
public function __construct( | ||
public readonly int $id, | ||
public readonly string $name, | ||
public readonly string $shortName, | ||
public readonly string $description, | ||
public readonly string $urn | ||
) { | ||
} | ||
} |
Oops, something went wrong.