directus_policies.sql correction ordre
This commit is contained in:
parent
5587f1bf61
commit
b0e4698e6a
|
|
@ -1,5 +1,46 @@
|
||||||
DROP TABLE IF EXISTS `directus_permissions`;
|
DROP TABLE IF EXISTS `directus_permissions`;
|
||||||
CREATE TABLE `directus_permissions` (
|
DROP TABLE IF EXISTS `directus_roles`;
|
||||||
|
DROP TABLE IF EXISTS `directus_policies`;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `directus_policies` (
|
||||||
|
`id` char(36) NOT NULL,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`icon` varchar(64) NOT NULL DEFAULT 'badge',
|
||||||
|
`description` text DEFAULT NULL,
|
||||||
|
`ip_access` text DEFAULT NULL,
|
||||||
|
`enforce_tfa` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
|
`admin_access` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
|
`app_access` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
|
||||||
|
LOCK TABLES `directus_policies` WRITE;
|
||||||
|
INSERT INTO `directus_policies` VALUES
|
||||||
|
('0ae2e179-bc8c-425a-849b-aacb6e7210ff','CanEdit','badge','Edit content.',NULL,0,0,1),
|
||||||
|
('771cf626-610f-450a-a2de-8c83ff2a4406','CanSee','robot','Display content to the front.',NULL,0,0,0),
|
||||||
|
('a5d612b4-e304-480a-86c4-d76f80e74cae','Administrator','verified','$t:admin_policy_description',NULL,0,1,1),
|
||||||
|
('abf8a154-5b1c-4a46-ac9c-7300570f4f17','$t:public_label','public','$t:public_description',NULL,0,0,0);
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `directus_roles` (
|
||||||
|
`id` char(36) NOT NULL,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`icon` varchar(64) NOT NULL DEFAULT 'supervised_user_circle',
|
||||||
|
`description` text DEFAULT NULL,
|
||||||
|
`parent` char(36) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `directus_roles_parent_foreign` (`parent`),
|
||||||
|
CONSTRAINT `directus_roles_parent_foreign` FOREIGN KEY (`parent`) REFERENCES `directus_roles` (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
|
||||||
|
LOCK TABLES `directus_roles` WRITE;
|
||||||
|
INSERT INTO `directus_roles` VALUES
|
||||||
|
('7d547ca1-9f66-4641-ab66-c4896f17eec8','Website','robot','Displays content for the front.',NULL),
|
||||||
|
('a5d612b4-e304-480a-86c4-d76f80e74cae','Administrator','verified','$t:admin_description',NULL),
|
||||||
|
('bd68ead9-6d43-4e01-a5d4-07ce0eacbdb0','User','supervised_user_circle','Edit content.',NULL);
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `directus_permissions` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`collection` varchar(64) NOT NULL,
|
`collection` varchar(64) NOT NULL,
|
||||||
`action` varchar(10) NOT NULL,
|
`action` varchar(10) NOT NULL,
|
||||||
|
|
@ -44,48 +85,7 @@ INSERT INTO `directus_permissions` VALUES
|
||||||
(67,'directus_flows','read','{\"trigger\":{\"_eq\":\"manual\"}}',NULL,NULL,'id,status,name,icon,color,options,trigger','0ae2e179-bc8c-425a-849b-aacb6e7210ff');
|
(67,'directus_flows','read','{\"trigger\":{\"_eq\":\"manual\"}}',NULL,NULL,'id,status,name,icon,color,options,trigger','0ae2e179-bc8c-425a-849b-aacb6e7210ff');
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `directus_roles`;
|
CREATE TABLE IF NOT EXISTS `directus_access` (
|
||||||
CREATE TABLE `directus_roles` (
|
|
||||||
`id` char(36) NOT NULL,
|
|
||||||
`name` varchar(100) NOT NULL,
|
|
||||||
`icon` varchar(64) NOT NULL DEFAULT 'supervised_user_circle',
|
|
||||||
`description` text DEFAULT NULL,
|
|
||||||
`parent` char(36) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `directus_roles_parent_foreign` (`parent`),
|
|
||||||
CONSTRAINT `directus_roles_parent_foreign` FOREIGN KEY (`parent`) REFERENCES `directus_roles` (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
||||||
|
|
||||||
LOCK TABLES `directus_roles` WRITE;
|
|
||||||
INSERT INTO `directus_roles` VALUES
|
|
||||||
('7d547ca1-9f66-4641-ab66-c4896f17eec8','Website','robot','Displays content for the front.',NULL),
|
|
||||||
('a5d612b4-e304-480a-86c4-d76f80e74cae','Administrator','verified','$t:admin_description',NULL),
|
|
||||||
('bd68ead9-6d43-4e01-a5d4-07ce0eacbdb0','User','supervised_user_circle','Edit content.',NULL);
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `directus_policies`;
|
|
||||||
CREATE TABLE `directus_policies` (
|
|
||||||
`id` char(36) NOT NULL,
|
|
||||||
`name` varchar(100) NOT NULL,
|
|
||||||
`icon` varchar(64) NOT NULL DEFAULT 'badge',
|
|
||||||
`description` text DEFAULT NULL,
|
|
||||||
`ip_access` text DEFAULT NULL,
|
|
||||||
`enforce_tfa` tinyint(1) NOT NULL DEFAULT 0,
|
|
||||||
`admin_access` tinyint(1) NOT NULL DEFAULT 0,
|
|
||||||
`app_access` tinyint(1) NOT NULL DEFAULT 0,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
||||||
|
|
||||||
LOCK TABLES `directus_policies` WRITE;
|
|
||||||
INSERT INTO `directus_policies` VALUES
|
|
||||||
('0ae2e179-bc8c-425a-849b-aacb6e7210ff','CanEdit','badge','Edit content.',NULL,0,0,1),
|
|
||||||
('771cf626-610f-450a-a2de-8c83ff2a4406','CanSee','robot','Display content to the front.',NULL,0,0,0),
|
|
||||||
('a5d612b4-e304-480a-86c4-d76f80e74cae','Administrator','verified','$t:admin_policy_description',NULL,0,1,1),
|
|
||||||
('abf8a154-5b1c-4a46-ac9c-7300570f4f17','$t:public_label','public','$t:public_description',NULL,0,0,0);
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `directus_access`;
|
|
||||||
CREATE TABLE `directus_access` (
|
|
||||||
`id` char(36) NOT NULL,
|
`id` char(36) NOT NULL,
|
||||||
`role` char(36) DEFAULT NULL,
|
`role` char(36) DEFAULT NULL,
|
||||||
`user` char(36) DEFAULT NULL,
|
`user` char(36) DEFAULT NULL,
|
||||||
|
|
@ -100,11 +100,10 @@ CREATE TABLE `directus_access` (
|
||||||
CONSTRAINT `directus_access_user_foreign` FOREIGN KEY (`user`) REFERENCES `directus_users` (`id`) ON DELETE CASCADE
|
CONSTRAINT `directus_access_user_foreign` FOREIGN KEY (`user`) REFERENCES `directus_users` (`id`) ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
|
||||||
|
|
||||||
LOCK TABLES `directus_access` WRITE;
|
LOCK TABLES `directus_access` WRITE;
|
||||||
INSERT INTO `directus_access` VALUES
|
INSERT INTO `directus_access` VALUES
|
||||||
('031e363f-5ca8-41c9-ad95-38ec2fb609c6','bd68ead9-6d43-4e01-a5d4-07ce0eacbdb0',NULL,'0ae2e179-bc8c-425a-849b-aacb6e7210ff',1),
|
('031e363f-5ca8-41c9-ad95-38ec2fb609c6','bd68ead9-6d43-4e01-a5d4-07ce0eacbdb0',NULL,'0ae2e179-bc8c-425a-849b-aacb6e7210ff',1),
|
||||||
('0ba406cf-b6a8-4026-8a4e-34714cf38642','7d547ca1-9f66-4641-ab66-c4896f17eec8',NULL,'771cf626-610f-450a-a2de-8c83ff2a4406',1),
|
('0ba406cf-b6a8-4026-8a4e-34714cf38642','7d547ca1-9f66-4641-ab66-c4896f17eec8',NULL,'771cf626-610f-450a-a2de-8c83ff2a4406',1),
|
||||||
('b130c6cc-83ea-492c-8135-15c47ddda63d',NULL,NULL,'abf8a154-5b1c-4a46-ac9c-7300570f4f17',1),
|
('b130c6cc-83ea-492c-8135-15c47ddda63d',NULL,NULL,'abf8a154-5b1c-4a46-ac9c-7300570f4f17',1),
|
||||||
('c015f537-954b-49be-b344-3742c0b446f7','a5d612b4-e304-480a-86c4-d76f80e74cae',NULL,'a5d612b4-e304-480a-86c4-d76f80e74cae',1);
|
('c015f537-954b-49be-b344-3742c0b446f7','a5d612b4-e304-480a-86c4-d76f80e74cae',NULL,'a5d612b4-e304-480a-86c4-d76f80e74cae',1);
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue