mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-15 04:44:36 +02:00
Show a notification on homepage and server info page if there is a new version available.
This commit is contained in:
parent
fa4af99525
commit
1fb334b0ca
16 changed files with 1741 additions and 1346 deletions
|
@ -110,4 +110,17 @@ class PermissionSchemaUpdaterTest extends WebTestCase
|
|||
self::assertEquals(PermissionData::INHERIT, $user->getPermissions()->getPermissionValue('projects', 'edit'));
|
||||
self::assertEquals(PermissionData::DISALLOW, $user->getPermissions()->getPermissionValue('projects', 'delete'));
|
||||
}
|
||||
|
||||
public function testUpgradeSchemaToVersion3(): void
|
||||
{
|
||||
$perm_data = new PermissionData();
|
||||
$perm_data->setSchemaVersion(2);
|
||||
$perm_data->setPermissionValue('system', 'server_infos', PermissionData::ALLOW);
|
||||
|
||||
$user = new TestPermissionHolder($perm_data);
|
||||
|
||||
//After the upgrade the server.show_updates should be set to ALLOW
|
||||
self::assertTrue($this->service->upgradeSchema($user, 3));
|
||||
self::assertSame(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('system', 'show_updates'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue