cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/rbac to 6c3038b
Date Thu, 07 Nov 2013 00:23:02 GMT
Updated Branches:
  refs/heads/rbac ce3638bb0 -> 6c3038b66


Add schema for policy.

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6c3038b6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6c3038b6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6c3038b6

Branch: refs/heads/rbac
Commit: 6c3038b66ded5cfe108b81ad60ec044df5acfa04
Parents: ce3638b
Author: Min Chen <min.chen@citrix.com>
Authored: Wed Nov 6 16:20:20 2013 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Wed Nov 6 16:20:20 2013 -0800

----------------------------------------------------------------------
 setup/db/db/schema-421to430.sql | 57 ++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c3038b6/setup/db/db/schema-421to430.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-421to430.sql b/setup/db/db/schema-421to430.sql
index 9c66744..b09e729 100644
--- a/setup/db/db/schema-421to430.sql
+++ b/setup/db/db/schema-421to430.sql
@@ -305,6 +305,8 @@ CREATE TABLE `cloud`.`acl_group` (
   `description` varchar(255) default NULL,
   `uuid` varchar(40),
   `domain_id` bigint unsigned NOT NULL,  
+  `account_id` bigint unsigned NOT NULL,
+  `view` varchar(40) default 'User' COMMENT 'response review this group account should see
for result',
   `removed` datetime COMMENT 'date the group was removed',
   `created` datetime COMMENT 'date the group was created',
   PRIMARY KEY  (`id`),
@@ -337,6 +339,7 @@ CREATE TABLE `cloud`.`acl_role` (
   CONSTRAINT `uc_acl_role__uuid` UNIQUE (`uuid`)  
 ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 
+
 CREATE TABLE `cloud`.`acl_group_role_map` (
   `id` bigint unsigned NOT NULL auto_increment,
   `group_id` bigint unsigned NOT NULL,
@@ -348,6 +351,60 @@ CREATE TABLE `cloud`.`acl_group_role_map` (
   CONSTRAINT `fk_acl_group_role_map__role_id` FOREIGN KEY(`role_id`) REFERENCES `acl_role`
(`id`) ON DELETE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;        
 
+CREATE TABLE `acl_policy` (
+  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+  `name` varchar(255) NOT NULL,
+  `description` varchar(255) DEFAULT NULL,
+  `uuid` varchar(40) DEFAULT NULL,
+  `domain_id` bigint(20) unsigned NOT NULL,
+  `account_id` bigint unsigned NOT NULL,  
+  `removed` datetime DEFAULT NULL COMMENT 'date the role was removed',
+  `created` datetime DEFAULT NULL COMMENT 'date the role was created',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `id` (`id`),
+  UNIQUE KEY `uc_acl_role__uuid` (`uuid`),
+  KEY `i_acl_role__removed` (`removed`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+CREATE TABLE `acl_group_policy_map` (
+  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+  `group_id` bigint(20) unsigned NOT NULL,
+  `policy_id` bigint(20) unsigned NOT NULL,
+  `removed` datetime DEFAULT NULL COMMENT 'date the policy was revoked from the group',
+  `created` datetime DEFAULT NULL COMMENT 'date the policy was attached to the group',
+  PRIMARY KEY (`id`),
+  KEY `fk_acl_group_policy_map__group_id` (`group_id`),
+  KEY `fk_acl_group_policy_map__policy_id` (`policy_id`),
+  CONSTRAINT `fk_acl_group_policy_map__group_id` FOREIGN KEY (`group_id`) REFERENCES `acl_group`
(`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_acl_group_policy_map__policy_id` FOREIGN KEY (`policy_id`) REFERENCES `acl_policy`
(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `acl_permission` (
+  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+  `action` varchar(100) NOT NULL,
+  `resource_type` varchar(100) NOT NULL,
+  `scope_id` bigint(20) unsigned NOT NULL,
+  `scope` varchar(40) DEFAULT NULL,
+  `access_type` varchar(40) NOT NULL,
+  `permission` int(1) unsigned NOT NULL COMMENT '1 allowed, 0 for denied',
+  `removed` datetime DEFAULT NULL COMMENT 'date the permission was revoked',
+  `created` datetime DEFAULT NULL COMMENT 'date the permission was granted',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `id` (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+CREATE TABLE `acl_policy_permission_map` (
+  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+  `policy_id` bigint(20) unsigned NOT NULL,
+  `permission_id` bigint(20) unsigned NOT NULL,
+  `removed` datetime DEFAULT NULL COMMENT 'date the permission was removed from the policy',
+  `created` datetime DEFAULT NULL COMMENT 'date the permission was added to the policy',
+  PRIMARY KEY (`id`),
+  KEY `fk_acl_policy_permission_map__policy_id` (`policy_id`),
+  KEY `fk_acl_policy_permission_map__permission_id` (`permission_id`),
+  CONSTRAINT `fk_acl_policy_permission_map__policy_id` FOREIGN KEY (`policy_id`) REFERENCES
`acl_policy` (`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_acl_policy_permission_map__permission_id` FOREIGN KEY (`permission_id`)
REFERENCES `acl_permission` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
 
 INSERT IGNORE INTO `cloud`.`acl_role` (id, name, description, uuid, domain_id, created, role_type)
VALUES (1, 'NORMAL', 'Domain user role', UUID(), 1, Now(), 'Static');
 INSERT IGNORE INTO `cloud`.`acl_role` (id, name, description, uuid, domain_id, created, role_type)
VALUES (2, 'ADMIN', 'Root admin role', UUID(), 1, Now(), 'Static');


Mime
View raw message