gunnar: server/kolab-webadmin/admin list.php,1.1,1.2
cvs at kolab.org
cvs at kolab.org
Wed Aug 22 14:41:38 CEST 2007
- Previous message: gunnar: server/php-kolab/Kolab_Webadmin/Webadmin db.php, NONE, 1.1 object.php, NONE, 1.1 address.class.php, 1.2, 1.3 administrator.class.php, 1.2, 1.3 auth.class.php, 1.4, 1.5 domainmaintainer.class.php, 1.3, 1.4 group.class.php, 1.3, 1.4 ldap.class.php, 1.8, 1.9 locale.php, 1.4, 1.5 maintainer.class.php, 1.2, 1.3 menu.php, 1.3, 1.4 sharedfolder.class.php, 1.3, 1.4 user.class.php, 1.5, 1.6 webadmin.class.php, 1.7, 1.8 debug.php, 1.2, NONE
- Next message: gunnar: server/php-kolab/Kolab_Webadmin/Webadmin address.class.php, 1.3, 1.4 administrator.class.php, 1.3, 1.4 db.php, 1.1, 1.2 domainmaintainer.class.php, 1.4, 1.5 group.class.php, 1.4, 1.5 ldap.class.php, 1.9, 1.10 maintainer.class.php, 1.3, 1.4 object.php, 1.1, 1.2 sharedfolder.class.php, 1.4, 1.5 user.class.php, 1.6, 1.7 webadmin.class.php, 1.8, 1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: gunnar
Update of /kolabrepository/server/kolab-webadmin/admin
In directory doto:/tmp/cvs-serv3718
Modified Files:
list.php
Log Message:
Adapt to the changes in Kolab_Webadmin.
Index: list.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/admin/list.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- list.php 22 Aug 2007 06:35:45 -0000 1.1
+++ list.php 22 Aug 2007 12:41:36 -0000 1.2
@@ -39,17 +39,10 @@
require_once('../config.php');
/** Get the requested object type. */
-$types = array('user',
- 'domainmaintainer',
- 'maintainer',
- 'administrator',
- 'address',
- 'group',
- 'sharedfolder');
-$default_type = $types[0];
+$default_type = KOLAB_OBJECT_USER;
$type = KolabForm::getRequestVar('type', $default_type);
-if (!in_array($type, $types)) {
+if (!in_array($type, KolabObjectDb::valid_types)) {
$type = $default_type;
}
@@ -59,21 +52,21 @@
/** Access logic */
switch($type) {
- case 'admin':
- case 'maintainer':
- $deny = !$ADMIN->isAdmin();
+ case KOLAB_OBJECT_ADMINISTRATOR:
+ case KOLAB_OBJECT_MAINTAINER:
+ $deny = !$ADMIN->hasGroup(array(KOLAB_OBJECT_ADMINISTRATOR));
break;
- case 'address':
- case 'domainmaintainer':
- $deny = !$ADMIN->isMaintainer() &&
- !$ADMIN->isAdmin();
+ case KOLAB_OBJECT_ADDRESS:
+ case KOLAB_OBJECT_DOMAINMAINTAINER:
+ $deny = !$ADMIN->hasGroup(array(KOLAB_OBJECT_ADMINISTRATOR,
+ KOLAB_OBJECT_MAINTAINER));
break;
- case 'user':
- case 'group':
- case 'sharedfolder':
- $deny = !$ADMIN->isDomainMaintainer() &&
- !$ADMIN->isMaintainer() &&
- !$ADMIN->isAdmin();
+ case KOLAB_OBJECT_USER:
+ case KOLAB_OBJECT_GROUP:
+ case KOLAB_OBJECT_SHAREDFOLDER:
+ $deny = !$ADMIN->hasGroup(array(KOLAB_OBJECT_ADMINISTRATOR,
+ KOLAB_OBJECT_DOMAINMAINTAINER,
+ KOLAB_OBJECT_MAINTAINER));
break;
default:
$deny = true;
@@ -83,29 +76,7 @@
if($deny) {
$ADMIN->assign('errors', array(_("Error: You don't have Permissions to access this Menu")));
} else {
- switch($type) {
- case 'admin':
- $entries = $ADMIN->getVisibleAdministrators();
- break;
- case 'address':
- $entries = $ADMIN->getVisibleAddresses();
- break;
- case 'group':
- $entries = $ADMIN->getVisibleGroups();
- break;
- case 'maintainers':
- $entries = $ADMIN->getVisibleMaintainers();
- break;
- case 'domainmaintainers':
- $entries = $ADMIN->getVisibleDomainMaintainers();
- break;
- case 'sharedfolder':
- $entries = $ADMIN->getVisibleSharedFolders();
- break;
- case 'user':
- $entries = $ADMIN->getVisibleUsers();
- break;
- }
+ $entries = $ADMIN->listVisible($type);
if (is_a($entries, 'PEAR_Error')) {
$ADMIN->assign('errors', $entries->getMessage());
} else {
- Previous message: gunnar: server/php-kolab/Kolab_Webadmin/Webadmin db.php, NONE, 1.1 object.php, NONE, 1.1 address.class.php, 1.2, 1.3 administrator.class.php, 1.2, 1.3 auth.class.php, 1.4, 1.5 domainmaintainer.class.php, 1.3, 1.4 group.class.php, 1.3, 1.4 ldap.class.php, 1.8, 1.9 locale.php, 1.4, 1.5 maintainer.class.php, 1.2, 1.3 menu.php, 1.3, 1.4 sharedfolder.class.php, 1.3, 1.4 user.class.php, 1.5, 1.6 webadmin.class.php, 1.7, 1.8 debug.php, 1.2, NONE
- Next message: gunnar: server/php-kolab/Kolab_Webadmin/Webadmin address.class.php, 1.3, 1.4 administrator.class.php, 1.3, 1.4 db.php, 1.1, 1.2 domainmaintainer.class.php, 1.4, 1.5 group.class.php, 1.4, 1.5 ldap.class.php, 1.9, 1.10 maintainer.class.php, 1.3, 1.4 object.php, 1.1, 1.2 sharedfolder.class.php, 1.4, 1.5 user.class.php, 1.6, 1.7 webadmin.class.php, 1.8, 1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the commits
mailing list