aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-06-01 15:00:19 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-06-01 15:00:19 +0000
commit2210961fa5d2e1c968e992b144d5113f5743cb4b (patch)
treec7a3ea5518189ed7cfa7e8725f9e45e4757f5fe7
parentad4cfc051ca94b8f326072bd877ede82195188d6 (diff)
downloadforums-2210961fa5d2e1c968e992b144d5113f5743cb4b.tar
forums-2210961fa5d2e1c968e992b144d5113f5743cb4b.tar.gz
forums-2210961fa5d2e1c968e992b144d5113f5743cb4b.tar.bz2
forums-2210961fa5d2e1c968e992b144d5113f5743cb4b.tar.xz
forums-2210961fa5d2e1c968e992b144d5113f5743cb4b.zip
Some hopefully finalish updates to auth schema
git-svn-id: file:///svn/phpbb/trunk@403 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/db/mysql_schema.sql12
-rw-r--r--phpBB/db/postgres_schema.sql12
-rw-r--r--phpBB/includes/auth.php8
3 files changed, 18 insertions, 14 deletions
diff --git a/phpBB/db/mysql_schema.sql b/phpBB/db/mysql_schema.sql
index 2056204981..1d303619c7 100644
--- a/phpBB/db/mysql_schema.sql
+++ b/phpBB/db/mysql_schema.sql
@@ -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)
);
diff --git a/phpBB/db/postgres_schema.sql b/phpBB/db/postgres_schema.sql
index 82c04133bc..c51899c10f 100644
--- a/phpBB/db/postgres_schema.sql
+++ b/phpBB/db/postgres_schema.sql
@@ -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)
);
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php
index f7959d8f5d..ee9d452360 100644
--- a/phpBB/includes/auth.php
+++ b/phpBB/includes/auth.php
@@ -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);