[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gforge-commits] gforge/common/include Group.class, 1.47, 1.48 constants
From: |
gsmet |
Subject: |
[Gforge-commits] gforge/common/include Group.class, 1.47, 1.48 constants.php, 1.3, 1.4 |
Date: |
Thu, 22 Jul 2004 06:34:14 -0500 |
Update of /cvsroot/gforge/gforge/common/include
In directory db.perdue.net:/tmp/cvs-serv23949/common/include
Modified Files:
Group.class constants.php
Log Message:
made private groups really private
Index: Group.class
===================================================================
RCS file: /cvsroot/gforge/gforge/common/include/Group.class,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- Group.class 22 Jul 2004 00:12:05 -0000 1.47
+++ Group.class 22 Jul 2004 11:34:11 -0000 1.48
@@ -196,9 +196,17 @@
}
}
}
-//
-// TODO: Need to add a check if this is not public, verify user is logged
in and isMember
-//
+
+ $systemGroups = array(GROUP_IS_NEWS, GROUP_IS_STATS,
GROUP_IS_PEER_RATINGS);
+ if(!$this->isPublic() && !in_array($id, $systemGroups)) {
+ $perm =& $this->getPermission(session_get_user());
+
+ if (!$perm || !is_object($perm) || !$perm->isMember()) {
+ // cannot use $Language as it is not created yet
+ $this->setError('Permission denied');
+ return false;
+ }
+ }
return true;
}
Index: constants.php
===================================================================
RCS file: /cvsroot/gforge/gforge/common/include/constants.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- constants.php 7 Jul 2004 20:43:25 -0000 1.3
+++ constants.php 22 Jul 2004 11:34:11 -0000 1.4
@@ -22,4 +22,11 @@
define('MAIL__MAILING_LIST_NAME_MIN_LENGTH', 4);
-?>
+/* Groups */
+
+define('GROUP_IS_MASTER', 1);
+define('GROUP_IS_NEWS', 3);
+define('GROUP_IS_STATS', 2);
+define('GROUP_IS_PEER_RATINGS', 4);
+
+?>
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gforge-commits] gforge/common/include Group.class, 1.47, 1.48 constants.php, 1.3, 1.4,
gsmet <=