|
From: Benjamin C. <bc...@us...> - 2001-12-07 14:36:28
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv17792/inc
Modified Files:
auth.php
Log Message:
Getting started on the user side of the project group restrictions
Index: auth.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/auth.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- auth.php 2001/11/14 14:28:06 1.2
+++ auth.php 2001/12/07 14:36:24 1.3
@@ -63,16 +63,17 @@
if (!$q->num_rows()) {
return 0;
} else {
- $this->auth['db_fields'] = unserialize($u['bug_list_fields']);
+ $this->auth['db_fields'] = @unserialize($u['bug_list_fields']);
// Grab group assignments and permissions based on groups
- $q->query("select group_name, perm_name"
+ $q->query("select gp.group_id, group_name, perm_name"
." from ".TBL_AUTH_PERM." ap, ".TBL_GROUP_PERM." gp, ".TBL_AUTH_GROUP." ag, ".TBL_USER_GROUP." ug"
." where ap.perm_id = gp.perm_id and gp.group_id = ag.group_id"
." and ag.group_id = ug.group_id and ug.user_id = {$u['user_id']}");
- while (list($group, $perm) = $q->grab()) {
+ while (list($groupid, $group, $perm) = $q->grab()) {
$this->auth['perm'][$perm] = true;
$this->auth['group'][$group] = true;
+ $this->auth['group_ids'][] = $groupid;
}
return $u['user_id'];
|