updated the group handling + revised admin permissions

This commit is contained in:
SJ
2012-06-25 22:14:30 +02:00
parent 9900f0aed2
commit 095f22c7b2
25 changed files with 323 additions and 68 deletions

View File

@ -189,7 +189,6 @@ create index `user_settings_idx` on `user_settings`(`username`);
drop table if exists `user`;
create table if not exists `user` (
`uid` int unsigned not null primary key,
`gid` int default 0,
`username` char(64) not null unique,
`realname` char(64) default null,
`password` char(48) default null,
@ -198,7 +197,7 @@ create table if not exists `user` (
`isadmin` tinyint default 0
) Engine=InnoDB;
insert into `user` (`uid`, `gid`, `username`, `realname`, `password`, `isadmin`, `domain`) values (0, 0, 'admin', 'built-in piler admin', '$1$PItc7d$zsUgON3JRrbdGS11t9JQW1', 1, 'local');
insert into `user` (`uid`, `username`, `realname`, `password`, `isadmin`, `domain`) values (0, 'admin', 'built-in piler admin', '$1$PItc7d$zsUgON3JRrbdGS11t9JQW1', 1, 'local');
drop table if exists `email`;
create table if not exists `email` (
@ -223,6 +222,14 @@ create table if not exists `group` (
) ENGINE=InnoDB;
create table if not exists `group_user` (
`id` bigint unsigned not null,
`uid` int unsigned not null,
key `group_user_idx` (`id`),
key `group_user_idx2` (`uid`)
) ENGINE=InnoDB;
create table if not exists `group_email` (
`id` bigint unsigned not null,
`email` char(128) not null,

View File

@ -10,6 +10,12 @@ create table if not exists `group_email` (
key `group_email_idx` (`id`)
) ENGINE=InnoDB;
alter table `user` add column `gid` int default 0;
create table if not exists `group_user` (
`id` bigint unsigned not null,
`uid` int unsigned not null,
key `group_user_idx` (`id`),
key `group_user_idx2` (`uid`)
) ENGINE=InnoDB;