1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-19 23:32:02 +02:00

Some hopefully finalish updates to auth schema

git-svn-id: file:///svn/phpbb/trunk@403 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-06-01 15:00:19 +00:00
parent ad4cfc051c
commit 2210961fa5
3 changed files with 18 additions and 14 deletions

View File

@ -18,7 +18,8 @@ CREATE TABLE phpbb_auth_access (
auth_reply tinyint(1) DEFAULT '0' NOT NULL,
auth_edit tinyint(1) DEFAULT '0' NOT NULL,
auth_delete tinyint(1) DEFAULT '0' NOT NULL,
auth_votecreate tinyint(1) DEFAULT '0' NOT NULL,
auth_votecreate tinyint(1) DEFAULT '0' NOT NULL,
auth_attachments tinyint(1) DEFAULT '0' NOT NULL,
auth_vote tinyint(1) DEFAULT '0' NOT NULL,
auth_mod tinyint(1) DEFAULT '0' NOT NULL,
auth_admin tinyint(1) DEFAULT '0' NOT NULL
@ -38,7 +39,8 @@ CREATE TABLE phpbb_auth_forums (
auth_edit tinyint(4) DEFAULT '0' NOT NULL,
auth_delete tinyint(4) DEFAULT '0' NOT NULL,
auth_votecreate tinyint(4) DEFAULT '0' NOT NULL,
auth_vote tinyint(4) DEFAULT '0' NOT NULL
auth_vote tinyint(4) DEFAULT '0' NOT NULL,
auth_attachments tinyint(4) DEFAULT '0' NOT NULL
);
#
@ -59,9 +61,9 @@ DROP TABLE IF EXISTS phpbb_groups;
CREATE TABLE phpbb_groups (
group_id int(11) NOT NULL auto_increment,
group_name varchar(100) NOT NULL,
group_note varchar(255) NOT NULL,
group_level tinyint(4) DEFAULT '0' NOT NULL,
single_user tinyint(1) DEFAULT '0' NOT NULL,
group_description varchar(255) NOT NULL,
group_moderator int(11) DEFAULT '0' NOT NULL,
group_single_user tinyint(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (group_id)
);

View File

@ -32,7 +32,8 @@ CREATE TABLE phpbb_auth_forums (
auth_edit int2 DEFAULT '0' NOT NULL,
auth_delete int2 DEFAULT '0' NOT NULL,
auth_votecreate int2 DEFAULT '0' NOT NULL,
auth_vote int2 DEFAULT '0' NOT NULL
auth_vote int2 DEFAULT '0' NOT NULL,
auth_attachments int2 DEFAULT '0' NOT NULL
);
@ -48,7 +49,8 @@ CREATE TABLE phpbb_auth_access (
auth_reply int2 DEFAULT '0' NOT NULL,
auth_edit int2 DEFAULT '0' NOT NULL,
auth_delete int2 DEFAULT '0' NOT NULL,
auth_votecreate int2 DEFAULT '0' NOT NULL,
auth_votecreate int2 DEFAULT '0' NOT NULL,
auth_attachments int2 DEFAULT '0' NOT NULL,
auth_vote int2 DEFAULT '0' NOT NULL,
auth_mod int2 DEFAULT '0' NOT NULL,
auth_admin int2 DEFAULT '0' NOT NULL
@ -69,9 +71,9 @@ CREATE TABLE phpbb_user_group (
CREATE TABLE phpbb_groups (
group_id int DEFAULT nextval('phpbb_groups_id_seq'::text) NOT NULL,
group_name varchar(100) NOT NULL,
group_note varchar(255) NOT NULL,
group_level int2 DEFAULT '0' NOT NULL,
single_user int2 DEFAULT '0' NOT NULL,
group_description varchar(255) NOT NULL,
group_moderator int4 DEFAULT '0' NOT NULL,
group_single_user int2 DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_groups_pkey PRIMARY KEY (group_id)
);

View File

@ -148,7 +148,7 @@ function auth($type, $forum_id, $userdata, $f_access = -1)
else
{
$forum_match_sql = ($forum_id != AUTH_LIST_ALL) ? "AND aa.forum_id = $forum_id" : "";
$sql = "SELECT aa.forum_id, $a_sql, aa.auth_mod, g.single_user
$sql = "SELECT aa.forum_id, $a_sql, aa.auth_mod, g.group_single_user
FROM ".AUTH_ACCESS_TABLE." aa, " . USER_GROUP_TABLE. " ug, " . GROUPS_TABLE. " g
WHERE ug.user_id = ".$userdata['user_id']. "
AND g.group_id = ug.group_id
@ -232,7 +232,7 @@ function auth($type, $forum_id, $userdata, $f_access = -1)
{
if(!$single_user)
{
$single_user = $u_access[$j]['single_user'];
$single_user = $u_access[$j]['group_single_user'];
$result = (!$single_user) ? ($auth_user[$key] || $u_access[$j][$key] || $u_access[$i]['auth_mod'] || $is_admin) : ($u_access[$j][$key] || $u_access[$i]['auth_mod'] || $is_admin);
@ -253,7 +253,7 @@ function auth($type, $forum_id, $userdata, $f_access = -1)
{
if(!$single_user)
{
$single_user = $u_access[$j]['single_user'];
$single_user = $u_access[$j]['group_single_user'];
$auth_user[$key] = (!$single_user) ? ($auth_user[$key] || $u_access[$j]['auth_mod'] || $is_admin) : ($u_access[$j]['auth_mod'] || $is_admin);
@ -304,7 +304,7 @@ function auth($type, $forum_id, $userdata, $f_access = -1)
{
if(!$single_user)
{
$single_user = $u_access[$j]['single_user'];
$single_user = $u_access[$j]['group_single_user'];
$result = (!$single_user) ? ($auth_user['auth_mod'] || $u_access[$j]['auth_mod'] || $is_admin) : ($u_access[$j]['auth_mod'] || $is_admin);