Define only what is allowed for column restrictions

This commit is contained in:
Frederic Guillot
2016-09-10 23:12:38 -04:00
parent 44f680cf2f
commit a0227cad69
12 changed files with 31 additions and 24 deletions

View File

@@ -132,8 +132,7 @@ class ColumnMoveRestrictionModelTest extends Base
$this->assertEquals(1, $columnMoveRestrictionModel->create(1, 1, 2, 3));
$this->assertEquals(2, $columnMoveRestrictionModel->create(1, 2, 3, 4));
$this->assertTrue($columnMoveRestrictionModel->isAllowed(1, 'Role D', 1, 2));
$this->assertTrue($columnMoveRestrictionModel->isAllowed(1, 'Role A', 1, 2));
$this->assertFalse($columnMoveRestrictionModel->isAllowed(1, 'Role A', 2, 3));
$this->assertFalse($columnMoveRestrictionModel->isAllowed(1, 'Role A', 1, 2));
$this->assertTrue($columnMoveRestrictionModel->isAllowed(1, 'Role A', 2, 3));
}
}