forked from Ansteorra/KMP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prep work for Hierarchical Secuity and some QOL updates and fix bug D…
…epartment Officer Roster options extend past container Ansteorra#361
- Loading branch information
Showing
94 changed files
with
1,639 additions
and
1,056 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
app/config/Migrations/20250227173909_AddScopeToMemberRoles.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Migrations\BaseMigration; | ||
|
||
class AddScopeToMemberRoles extends BaseMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/migrations/4/en/migrations.html#the-change-method | ||
* @return void | ||
*/ | ||
public function change(): void | ||
{ | ||
$table = $this->table('member_roles'); | ||
$table->addColumn("branch_id", "integer", [ | ||
"default" => null, | ||
"limit" => 11, | ||
"null" => true, | ||
]) | ||
->update(); | ||
|
||
$table = $this->table('member_roles'); | ||
$table->addForeignKey("branch_id", "branches", "id", [ | ||
"update" => "NO_ACTION", | ||
"delete" => "NO_ACTION", | ||
]) | ||
->update(); | ||
|
||
$table = $this->table('permissions'); | ||
$table->addColumn("scoping_rule", "string", [ | ||
"default" => "Global", | ||
"limit" => 255, | ||
"null" => false, | ||
]) | ||
->update(); | ||
|
||
//update existing permissions to have no scoping | ||
$this->execute("UPDATE permissions SET scoping_rule = 'Global'"); | ||
$table = $this->table('permissions'); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
app/config/Migrations/20250227230531_AddDomainToBranch.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Migrations\BaseMigration; | ||
|
||
class AddDomainToBranch extends BaseMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/migrations/4/en/migrations.html#the-change-method | ||
* @return void | ||
*/ | ||
public function change(): void | ||
{ | ||
$table = $this->table('branches'); | ||
$table->addColumn('domain', 'string', ['default' => '', 'limit' => 255, 'null' => false]); | ||
$table->update(); | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.