-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from itk-dev/feature/318-readonly-feed-data
318 - Read-only feed data
- Loading branch information
Showing
31 changed files
with
272 additions
and
49 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
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 was deleted.
Oops, something went wrong.
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,27 @@ | ||
# User handling and login | ||
|
||
Date: 28-09-2023 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
The idea is that each organization/institution has an appointed admin that is allowed to send users invitation out for | ||
his/her organization. Each user can be part of more than one organization, it just requires that they get an invitation | ||
and thereby link their account to a given organization. | ||
|
||
## Decision | ||
|
||
For this first phase of the project, users login by using username and password. If there needs to be a higher level of | ||
security surrounding user login in the future, an identity Provider such as MitId can be connected to the project, but | ||
for now the customer has specifically requested (due to experiences with login in the existing solution) that we | ||
continue using username and password. | ||
|
||
Using Single Sign On (SSO) would be a more professional login method for the future, but for now it's not a part of the | ||
project. | ||
|
||
## Consequences | ||
|
||
Login using username and password is not as secure as using SSO. |
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,24 @@ | ||
# Editability of content | ||
|
||
Date: 27-11-2023 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
The forms UI (administrative user interface) allows users to add new content and change existing data. | ||
|
||
## Decision | ||
|
||
All data imported through feeds are marked as read-only as changes made in the administrative UI are overwritten by | ||
changes in the feed. | ||
|
||
All other data is editable and will trigger a reindex of the data changes and all related data. | ||
|
||
## Consequences | ||
|
||
Imported data from feeds are not editable, and some changes to data not from feeds will trigger a reindex of data, | ||
which may trigger a lager job to be processed based on which data is changed. E.g. if an address is changed, that will | ||
trigger an update of all content in indexes that contains that address. Which may be a large number of events. |
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,41 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20231127121531 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 address ADD editable TINYINT(1) NOT NULL'); | ||
$this->addSql('ALTER TABLE event ADD editable TINYINT(1) NOT NULL'); | ||
$this->addSql('ALTER TABLE image ADD editable TINYINT(1) NOT NULL'); | ||
$this->addSql('ALTER TABLE location ADD editable TINYINT(1) NOT NULL'); | ||
$this->addSql('ALTER TABLE occurrence ADD editable TINYINT(1) NOT NULL'); | ||
$this->addSql('ALTER TABLE tag ADD editable TINYINT(1) NOT NULL'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE occurrence DROP editable'); | ||
$this->addSql('ALTER TABLE location DROP editable'); | ||
$this->addSql('ALTER TABLE event DROP editable'); | ||
$this->addSql('ALTER TABLE tag DROP editable'); | ||
$this->addSql('ALTER TABLE address DROP editable'); | ||
$this->addSql('ALTER TABLE image DROP editable'); | ||
} | ||
} |
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,28 @@ | ||
<?php | ||
|
||
namespace App\Controller\Admin; | ||
|
||
use App\Entity\EditableEntityInterface; | ||
use EasyCorp\Bundle\EasyAdminBundle\Config\Action; | ||
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions; | ||
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; | ||
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController; | ||
|
||
abstract class AbstractBaseCrudController extends AbstractCrudController | ||
{ | ||
public static function getEntityFqcn(): string | ||
{ | ||
return self::class; | ||
} | ||
|
||
public function configureActions(Actions $actions): Actions | ||
{ | ||
return parent::configureActions($actions) | ||
->update(Crud::PAGE_INDEX, Action::EDIT, static function (Action $action) { | ||
return $action->displayIf(static function (object $entity) { | ||
return !($entity instanceof EditableEntityInterface) || $entity->isEditable(); | ||
}); | ||
}) | ||
->add(Crud::PAGE_INDEX, Action::DETAIL); | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.