mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 15:27:42 +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:
@@ -18,7 +18,8 @@ CREATE TABLE phpbb_auth_access (
|
|||||||
auth_reply tinyint(1) DEFAULT '0' NOT NULL,
|
auth_reply tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
auth_edit tinyint(1) DEFAULT '0' NOT NULL,
|
auth_edit tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
auth_delete 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_vote tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
auth_mod tinyint(1) DEFAULT '0' NOT NULL,
|
auth_mod tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
auth_admin 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_edit tinyint(4) DEFAULT '0' NOT NULL,
|
||||||
auth_delete tinyint(4) DEFAULT '0' NOT NULL,
|
auth_delete tinyint(4) DEFAULT '0' NOT NULL,
|
||||||
auth_votecreate 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 (
|
CREATE TABLE phpbb_groups (
|
||||||
group_id int(11) NOT NULL auto_increment,
|
group_id int(11) NOT NULL auto_increment,
|
||||||
group_name varchar(100) NOT NULL,
|
group_name varchar(100) NOT NULL,
|
||||||
group_note varchar(255) NOT NULL,
|
group_description varchar(255) NOT NULL,
|
||||||
group_level tinyint(4) DEFAULT '0' NOT NULL,
|
group_moderator int(11) DEFAULT '0' NOT NULL,
|
||||||
single_user tinyint(1) DEFAULT '0' NOT NULL,
|
group_single_user tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
PRIMARY KEY (group_id)
|
PRIMARY KEY (group_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -32,7 +32,8 @@ CREATE TABLE phpbb_auth_forums (
|
|||||||
auth_edit int2 DEFAULT '0' NOT NULL,
|
auth_edit int2 DEFAULT '0' NOT NULL,
|
||||||
auth_delete 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_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_reply int2 DEFAULT '0' NOT NULL,
|
||||||
auth_edit int2 DEFAULT '0' NOT NULL,
|
auth_edit int2 DEFAULT '0' NOT NULL,
|
||||||
auth_delete 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_vote int2 DEFAULT '0' NOT NULL,
|
||||||
auth_mod int2 DEFAULT '0' NOT NULL,
|
auth_mod int2 DEFAULT '0' NOT NULL,
|
||||||
auth_admin 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 (
|
CREATE TABLE phpbb_groups (
|
||||||
group_id int DEFAULT nextval('phpbb_groups_id_seq'::text) NOT NULL,
|
group_id int DEFAULT nextval('phpbb_groups_id_seq'::text) NOT NULL,
|
||||||
group_name varchar(100) NOT NULL,
|
group_name varchar(100) NOT NULL,
|
||||||
group_note varchar(255) NOT NULL,
|
group_description varchar(255) NOT NULL,
|
||||||
group_level int2 DEFAULT '0' NOT NULL,
|
group_moderator int4 DEFAULT '0' NOT NULL,
|
||||||
single_user int2 DEFAULT '0' NOT NULL,
|
group_single_user int2 DEFAULT '0' NOT NULL,
|
||||||
CONSTRAINT phpbb_groups_pkey PRIMARY KEY (group_id)
|
CONSTRAINT phpbb_groups_pkey PRIMARY KEY (group_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -148,7 +148,7 @@ function auth($type, $forum_id, $userdata, $f_access = -1)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$forum_match_sql = ($forum_id != AUTH_LIST_ALL) ? "AND aa.forum_id = $forum_id" : "";
|
$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
|
FROM ".AUTH_ACCESS_TABLE." aa, " . USER_GROUP_TABLE. " ug, " . GROUPS_TABLE. " g
|
||||||
WHERE ug.user_id = ".$userdata['user_id']. "
|
WHERE ug.user_id = ".$userdata['user_id']. "
|
||||||
AND g.group_id = ug.group_id
|
AND g.group_id = ug.group_id
|
||||||
@@ -232,7 +232,7 @@ function auth($type, $forum_id, $userdata, $f_access = -1)
|
|||||||
{
|
{
|
||||||
if(!$single_user)
|
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);
|
$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)
|
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);
|
$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)
|
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);
|
$result = (!$single_user) ? ($auth_user['auth_mod'] || $u_access[$j]['auth_mod'] || $is_admin) : ($u_access[$j]['auth_mod'] || $is_admin);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user