|
From: Ken T. <ke...@us...> - 2003-04-07 21:58:35
|
Update of /cvsroot/phpbt/phpbt/inc
In directory sc8-pr-cvs1:/tmp/cvs-serv6497/inc
Modified Files:
auth.php
Log Message:
oops, this should have gone in with the proj-admin patch. (see functions.php)
Index: auth.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/auth.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- auth.php 24 May 2002 12:47:33 -0000 1.17
+++ auth.php 7 Apr 2003 21:58:30 -0000 1.18
@@ -128,6 +128,31 @@
}
}
+ function check_proj($project_id) {
+ global $db;
+
+ if ($this->have_perm_proj($project_id)) {
+ return true;
+ } else {
+ $this->perm_invalid($HTTP_SESSION_VARS['perms'], $p);
+ exit();
+ }
+ }
+
+ function have_perm_proj($project_id) {
+ global $db;
+
+ if ($this->have_perm('Admin')) {
+ return true;
+ }
+
+ if ( $db->getCol('SELECT user_id FROM '.TBL_PROJECT_PERM.' WHERE user_id = '.$_SESSION['uid']." AND project_id = $project_id") ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
function check_auth($auth_var, $reqs) {
global $HTTP_SESSION_VARS;
|