Commit 970f7244 authored by Robert Ricci's avatar Robert Ricci
Browse files

Added a 'global_vtypes' table, which contains vtypes that get

defined for everyone. Admins can use this, for example, to make
type aliases.
parent 561dd63d
-- MySQL dump 8.23 -- MySQL dump 8.23
-- --
-- Host: localhost Database: tbdb -- Host: localhost Database: tbdb
--------------------------------------------------------- ---------------------------------------------------------
...@@ -504,6 +504,17 @@ CREATE TABLE global_policies ( ...@@ -504,6 +504,17 @@ CREATE TABLE global_policies (
PRIMARY KEY (policy,auxdata) PRIMARY KEY (policy,auxdata)
) TYPE=MyISAM; ) TYPE=MyISAM;
--
-- Table structure for table `global_vtypes`
--
CREATE TABLE global_vtypes (
vtype varchar(30) NOT NULL default '',
weight float NOT NULL default '0.5',
types text NOT NULL,
PRIMARY KEY (vtype)
) TYPE=MyISAM;
-- --
-- Table structure for table `group_membership` -- Table structure for table `group_membership`
-- --
......
...@@ -2792,4 +2792,11 @@ last_net_act,last_cpu_act,last_ext_act); ...@@ -2792,4 +2792,11 @@ last_net_act,last_cpu_act,last_ext_act);
alter table projects add cvsrepo_public tinyint(1) \ alter table projects add cvsrepo_public tinyint(1) \
NOT NULL default '0' after linked_to_us; NOT NULL default '0' after linked_to_us;
4.9: 4.9: Add a 'global_vtypes' table to allow admins to create vtypes that apply
to all users:
create table global_vtypes (vtype varchar(30) primary key, \
weight float not null default 0.5, \
types text not null default "");
4.10:
...@@ -408,6 +408,16 @@ sub GenDefsFile($) ...@@ -408,6 +408,16 @@ sub GenDefsFile($)
if (defined($osid) && $osid ne ""); if (defined($osid) && $osid ne "");
} }
print TCL "\n"; print TCL "\n";
print TCL "# Global Vtypes\n";
$query_result =
DBQueryFatal("select vtype, weight, types ".
" from global_vtypes");
while (my ($vtype, $weight, $types) = $query_result->fetchrow_array()) {
print TCL "set ::GLOBALS::vtypes($vtype) [Vtype $vtype $weight {$types}]\n";
}
print TCL "\n";
print TCL "# Node Permissions\n"; print TCL "# Node Permissions\n";
my %nodeperms = (); my %nodeperms = ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment