mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Removed warnings about changed permissions, as the old changes are reset later, and we now do the permission migration in Part-DB directly
This commit is contained in:
parent
2717d7d311
commit
036eaf3bae
4 changed files with 0 additions and 16 deletions
|
@ -66,8 +66,6 @@ final class Version20190913141126 extends AbstractMultiPlatformMigration
|
||||||
';
|
';
|
||||||
|
|
||||||
$this->addSql($sql);
|
$this->addSql($sql);
|
||||||
|
|
||||||
$this->printPermissionUpdateMessage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mySQLDown(Schema $schema): void
|
public function mySQLDown(Schema $schema): void
|
||||||
|
|
|
@ -34,8 +34,6 @@ final class Version20200311204104 extends AbstractMultiPlatformMigration
|
||||||
$sql = 'UPDATE `groups`'.
|
$sql = 'UPDATE `groups`'.
|
||||||
'SET perms_parts_parameters = 681 WHERE (id = 2 AND name = "readonly");';
|
'SET perms_parts_parameters = 681 WHERE (id = 2 AND name = "readonly");';
|
||||||
$this->addSql($sql);
|
$this->addSql($sql);
|
||||||
|
|
||||||
$this->printPermissionUpdateMessage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mySQLDown(Schema $schema): void
|
public function mySQLDown(Schema $schema): void
|
||||||
|
|
|
@ -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);
|
(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;
|
EOD;
|
||||||
$this->addSql($sql);
|
$this->addSql($sql);
|
||||||
|
|
||||||
$this->printPermissionUpdateMessage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sqLiteDown(Schema $schema): void
|
public function sqLiteDown(Schema $schema): void
|
||||||
|
|
|
@ -36,8 +36,6 @@ use Psr\Log\LoggerInterface;
|
||||||
abstract class AbstractMultiPlatformMigration extends AbstractMigration
|
abstract class AbstractMultiPlatformMigration extends AbstractMigration
|
||||||
{
|
{
|
||||||
public const ADMIN_PW_LENGTH = 10;
|
public const ADMIN_PW_LENGTH = 10;
|
||||||
|
|
||||||
protected bool $permissions_updated = false;
|
|
||||||
protected string $admin_pw = '';
|
protected string $admin_pw = '';
|
||||||
|
|
||||||
protected LoggerInterface $logger;
|
protected LoggerInterface $logger;
|
||||||
|
@ -122,17 +120,9 @@ abstract class AbstractMultiPlatformMigration extends AbstractMigration
|
||||||
return password_hash($this->admin_pw, PASSWORD_DEFAULT);
|
return password_hash($this->admin_pw, PASSWORD_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function printPermissionUpdateMessage(): void
|
|
||||||
{
|
|
||||||
$this->permissions_updated = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function postUp(Schema $schema): void
|
public function postUp(Schema $schema): void
|
||||||
{
|
{
|
||||||
parent::postUp($schema);
|
parent::postUp($schema);
|
||||||
if($this->permissions_updated) {
|
|
||||||
$this->logger->warning('<question>[!!!] Permissions were updated! Please check if they fit your expectations!</question>');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($this->admin_pw)) {
|
if (!empty($this->admin_pw)) {
|
||||||
$this->logger->warning('');
|
$this->logger->warning('');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue