modify directus_policies.sql
This commit is contained in:
parent
0ed3b2802c
commit
ada37ab83a
|
|
@ -1,82 +1,10 @@
|
|||
/*M!999999\- enable the sandbox mode */
|
||||
-- MariaDB dump 10.19 Distrib 10.11.10-MariaDB, for debian-linux-gnu (x86_64)
|
||||
--
|
||||
-- Host: localhost Database: directus
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 10.11.10-MariaDB-ubu2204
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `directus_roles`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `directus_roles`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
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;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `directus_roles`
|
||||
--
|
||||
|
||||
LOCK TABLES `directus_roles` WRITE;
|
||||
/*!40000 ALTER TABLE `directus_roles` DISABLE KEYS */;
|
||||
INSERT INTO `directus_roles` VALUES
|
||||
('e55003a8-7a11-43d3-b9c0-13f3170b06da','Administrator','verified','$t:admin_description',NULL),
|
||||
('f512d0e1-7349-418a-a18f-7a7572441f99','Website','robot','Gives access to the content to the front.',NULL),
|
||||
('f66390d0-24a6-4dcc-8ed6-ca8857b4266c','User','supervised_user_circle','Is able to edit content.',NULL);
|
||||
/*!40000 ALTER TABLE `directus_roles` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `directus_permissions`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `directus_permissions`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `directus_permissions` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`collection` varchar(64) NOT NULL,
|
||||
`action` varchar(10) NOT NULL,
|
||||
`permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`permissions`)),
|
||||
`validation` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`validation`)),
|
||||
`presets` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`presets`)),
|
||||
`fields` text DEFAULT NULL,
|
||||
`policy` char(36) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `directus_permissions_collection_foreign` (`collection`),
|
||||
KEY `directus_permissions_policy_foreign` (`policy`),
|
||||
CONSTRAINT `directus_permissions_policy_foreign` FOREIGN KEY (`policy`) REFERENCES `directus_policies` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `directus_permissions`
|
||||
--
|
||||
|
||||
LOCK TABLES `directus_permissions` WRITE;
|
||||
/*!40000 ALTER TABLE `directus_permissions` DISABLE KEYS */;
|
||||
INSERT INTO `directus_permissions` VALUES
|
||||
(1,'directus_files','read',NULL,NULL,NULL,'*','a2e48172-ac4e-4848-9c59-4158826e4f63'),
|
||||
(2,'directus_comments','read','{}',NULL,NULL,'*','7d8b3285-54a4-4946-a3ea-121eda2536ee'),
|
||||
|
|
@ -95,50 +23,10 @@ INSERT INTO `directus_permissions` VALUES
|
|||
(23,'directus_shares','create','{}',NULL,NULL,'*','7d8b3285-54a4-4946-a3ea-121eda2536ee'),
|
||||
(24,'directus_shares','update','{\"user_created\":{\"_eq\":\"$CURRENT_USER\"}}',NULL,NULL,'*','7d8b3285-54a4-4946-a3ea-121eda2536ee'),
|
||||
(25,'directus_shares','delete','{\"user_created\":{\"_eq\":\"$CURRENT_USER\"}}',NULL,NULL,'*','7d8b3285-54a4-4946-a3ea-121eda2536ee');
|
||||
/*!40000 ALTER TABLE `directus_permissions` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `directus_policies`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `directus_policies`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
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;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `directus_policies`
|
||||
--
|
||||
|
||||
LOCK TABLES `directus_policies` WRITE;
|
||||
/*!40000 ALTER TABLE `directus_policies` DISABLE KEYS */;
|
||||
INSERT INTO `directus_policies` VALUES
|
||||
('7d8b3285-54a4-4946-a3ea-121eda2536ee','ModifyContent','supervised_user_circle','Can edit content',NULL,0,0,1),
|
||||
('a2e48172-ac4e-4848-9c59-4158826e4f63','SeeContent','robot','Give access to the content to the front-end.',NULL,0,0,0),
|
||||
('abf8a154-5b1c-4a46-ac9c-7300570f4f17','$t:public_label','public','$t:public_description',NULL,0,0,0),
|
||||
('ecc207a9-c225-4772-8245-d102f1868e38','Administrator','verified','$t:admin_description',NULL,0,1,1);
|
||||
/*!40000 ALTER TABLE `directus_policies` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2024-11-28 21:23:19
|
||||
UNLOCK TABLES;
|
||||
Loading…
Reference in New Issue