Add project restrictions for custom roles
This commit is contained in:
@@ -6,7 +6,22 @@ use Kanboard\Core\Security\Token;
|
||||
use Kanboard\Core\Security\Role;
|
||||
use PDO;
|
||||
|
||||
const VERSION = 104;
|
||||
const VERSION = 105;
|
||||
|
||||
function version_105(PDO $pdo)
|
||||
{
|
||||
$pdo->exec("
|
||||
CREATE TABLE project_role_has_restrictions (
|
||||
restriction_id INTEGER PRIMARY KEY,
|
||||
project_id INTEGER NOT NULL,
|
||||
role_id INTEGER NOT NULL,
|
||||
rule VARCHAR(255) NOT NULL,
|
||||
UNIQUE(role_id, rule),
|
||||
FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY(role_id) REFERENCES project_has_roles(role_id) ON DELETE CASCADE
|
||||
)
|
||||
");
|
||||
}
|
||||
|
||||
function version_104(PDO $pdo)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user