mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-26 03:38:47 +02:00
Added an mechanism to upgrade permissions schema (manually by calling a program)
This commit is contained in:
parent
60d5776cb7
commit
0e56f11b6b
5 changed files with 373 additions and 1 deletions
|
@ -146,4 +146,16 @@ class PermissionDataTest extends TestCase
|
|||
$this->assertFalse($data->isPermissionSet('perm1', 'op2'));
|
||||
$this->assertFalse($data->isPermissionSet('perm1', 'op3'));
|
||||
}
|
||||
|
||||
public function testGetSchemaVersion()
|
||||
{
|
||||
$data = new PermissionData();
|
||||
|
||||
//By default the schema version must be the CURRENT_SCHEMA_VERSION
|
||||
$this->assertEquals(PermissionData::CURRENT_SCHEMA_VERSION, $data->getSchemaVersion());
|
||||
|
||||
//Ensure that the schema version can be set
|
||||
$data->setSchemaVersion(12345);
|
||||
$this->assertEquals(12345, $data->getSchemaVersion());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue