From 036eaf3bae661c0374112f315f2f8077dcba529d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sat, 8 Apr 2023 23:29:23 +0200 Subject: [PATCH] Removed warnings about changed permissions, as the old changes are reset later, and we now do the permission migration in Part-DB directly --- migrations/Version20190913141126.php | 2 -- migrations/Version20200311204104.php | 2 -- migrations/Version20200502161750.php | 2 -- src/Migration/AbstractMultiPlatformMigration.php | 10 ---------- 4 files changed, 16 deletions(-) diff --git a/migrations/Version20190913141126.php b/migrations/Version20190913141126.php index 28b8a0cc..58093338 100644 --- a/migrations/Version20190913141126.php +++ b/migrations/Version20190913141126.php @@ -66,8 +66,6 @@ final class Version20190913141126 extends AbstractMultiPlatformMigration '; $this->addSql($sql); - - $this->printPermissionUpdateMessage(); } public function mySQLDown(Schema $schema): void diff --git a/migrations/Version20200311204104.php b/migrations/Version20200311204104.php index a1b13baf..2a90b62c 100644 --- a/migrations/Version20200311204104.php +++ b/migrations/Version20200311204104.php @@ -34,8 +34,6 @@ final class Version20200311204104 extends AbstractMultiPlatformMigration $sql = 'UPDATE `groups`'. 'SET perms_parts_parameters = 681 WHERE (id = 2 AND name = "readonly");'; $this->addSql($sql); - - $this->printPermissionUpdateMessage(); } public function mySQLDown(Schema $schema): void diff --git a/migrations/Version20200502161750.php b/migrations/Version20200502161750.php index 1b5b4f52..93bb0d00 100644 --- a/migrations/Version20200502161750.php +++ b/migrations/Version20200502161750.php @@ -134,8 +134,6 @@ EOD; (2, 1, 'admin', '{$admin_pw}', 1, '', '', '', '', NULL, NULL, NULL, '', '', '2020-06-13 23:39:26', '2020-06-13 23:39:26', 21845, 21845, 21845, 21, 85, 21, 349525, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 0, NULL, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, 0, NULL, '', NULL, 0, 0); EOD; $this->addSql($sql); - - $this->printPermissionUpdateMessage(); } public function sqLiteDown(Schema $schema): void diff --git a/src/Migration/AbstractMultiPlatformMigration.php b/src/Migration/AbstractMultiPlatformMigration.php index a4a4e827..75f94062 100644 --- a/src/Migration/AbstractMultiPlatformMigration.php +++ b/src/Migration/AbstractMultiPlatformMigration.php @@ -36,8 +36,6 @@ use Psr\Log\LoggerInterface; abstract class AbstractMultiPlatformMigration extends AbstractMigration { public const ADMIN_PW_LENGTH = 10; - - protected bool $permissions_updated = false; protected string $admin_pw = ''; protected LoggerInterface $logger; @@ -122,17 +120,9 @@ abstract class AbstractMultiPlatformMigration extends AbstractMigration return password_hash($this->admin_pw, PASSWORD_DEFAULT); } - public function printPermissionUpdateMessage(): void - { - $this->permissions_updated = true; - } - public function postUp(Schema $schema): void { parent::postUp($schema); - if($this->permissions_updated) { - $this->logger->warning('[!!!] Permissions were updated! Please check if they fit your expectations!'); - } if (!empty($this->admin_pw)) { $this->logger->warning('');