forked from extern/egroupware
removed soacl, as it contained only calls to the acl-class of the API, which are ok in BO
This commit is contained in:
parent
335cef9104
commit
996f686d29
@ -36,9 +36,8 @@
|
|||||||
define('EGW_ACL_DIRECT_BOOKING',128);
|
define('EGW_ACL_DIRECT_BOOKING',128);
|
||||||
define('EGW_ACL_CALREAD',256);
|
define('EGW_ACL_CALREAD',256);
|
||||||
|
|
||||||
$this->so =& CreateObject('resources.so_acl');
|
$this->permissions = $GLOBALS['egw']->acl->get_all_location_rights($GLOBALS['egw_info']['user']['account_id'],'resources',true);
|
||||||
$this->permissions = $this->so->get_permissions($GLOBALS['egw_info']['user']['account_id'],true);
|
$this->egw_cats =& CreateObject('phpgwapi.categories','','resources');
|
||||||
$this->egw_cats = createobject('phpgwapi.categories','','resources');
|
|
||||||
$this->accounts = $GLOBALS['egw']->accounts->get_list();
|
$this->accounts = $GLOBALS['egw']->accounts->get_list();
|
||||||
$this->debug = False;
|
$this->debug = False;
|
||||||
|
|
||||||
@ -66,7 +65,7 @@
|
|||||||
/**
|
/**
|
||||||
* get list of cats where current user has given rights
|
* get list of cats where current user has given rights
|
||||||
*
|
*
|
||||||
* @author Cornelius Wei<EFBFBD> <egw@von-und-zu-weiss.de>
|
* @author Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||||
* @param int $perm_type one of EGW_ACL_READ, EGW_ACL_ADD, EGW_ACL_EDIT, EGW_ACL_DELETE, EGW_ACL_DIRECT_BOOKING
|
* @param int $perm_type one of EGW_ACL_READ, EGW_ACL_ADD, EGW_ACL_EDIT, EGW_ACL_DELETE, EGW_ACL_DIRECT_BOOKING
|
||||||
* @return array cat_id => cat_name
|
* @return array cat_id => cat_name
|
||||||
* TODO mark subcats and so on!
|
* TODO mark subcats and so on!
|
||||||
@ -101,20 +100,19 @@
|
|||||||
/**
|
/**
|
||||||
* gets name of category
|
* gets name of category
|
||||||
*
|
*
|
||||||
* @author Lukas Wei<EFBFBD> <wnz.gh05t@users.sourceforge.net>
|
* @author Lukas Weiss <wnz.gh05t@users.sourceforge.net>
|
||||||
* @param int $cat_id
|
* @param int $cat_id
|
||||||
* @return mixed name of category
|
* @return mixed name of category
|
||||||
*/
|
*/
|
||||||
function get_cat_name($cat_id)
|
function get_cat_name($cat_id)
|
||||||
{
|
{
|
||||||
$cat = $this->egw_cats->return_single($cat_id);
|
return $this->egw_cats->id2name($cat_id);
|
||||||
return $cat[0]['name'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gets userid of admin for given category
|
* gets userid of admin for given category
|
||||||
*
|
*
|
||||||
* @author Cornelius Wei<EFBFBD> <egw@von-und-zu-weiss.de>
|
* @author Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||||
* @param int $cat_id
|
* @param int $cat_id
|
||||||
* @return int userid of cat admin
|
* @return int userid of cat admin
|
||||||
*/
|
*/
|
||||||
@ -153,7 +151,7 @@
|
|||||||
*/
|
*/
|
||||||
function get_rights($cat_id)
|
function get_rights($cat_id)
|
||||||
{
|
{
|
||||||
return $this->so->get_rights('L'.$cat_id);
|
return $GLOBALS['egw']->acl->get_all_rights('L'.$cat_id,'resources');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -191,9 +189,7 @@
|
|||||||
$calbookcat = $calbook ? $calbook : array();
|
$calbookcat = $calbook ? $calbook : array();
|
||||||
$admincat = $admin ? $admin : array();
|
$admincat = $admin ? $admin : array();
|
||||||
|
|
||||||
$this->so->remove_location('L' . $cat_id);
|
$GLOBALS['egw']->acl->delete_repository('resources','L' . $cat_id,false);
|
||||||
// reset($this->accounts);
|
|
||||||
// while (list($null,$account) = each($this->accounts))
|
|
||||||
|
|
||||||
foreach($this->accounts as $num => $account)
|
foreach($this->accounts as $num => $account)
|
||||||
{
|
{
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**************************************************************************\
|
|
||||||
* eGroupWare - Resources *
|
|
||||||
* http://www.egroupware.org *
|
|
||||||
* -------------------------------------------- *
|
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
|
||||||
* under the terms of the GNU General Public License as published by the *
|
|
||||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
|
||||||
* option) any later version. *
|
|
||||||
* -------------------------------------------- *
|
|
||||||
\**************************************************************************/
|
|
||||||
|
|
||||||
/* $Id: */
|
|
||||||
|
|
||||||
class so_acl
|
|
||||||
{
|
|
||||||
function get_rights($location)
|
|
||||||
{
|
|
||||||
return $GLOBALS['egw']->acl->get_all_rights($location,'news_admin');
|
|
||||||
}
|
|
||||||
|
|
||||||
function remove_location($location)
|
|
||||||
{
|
|
||||||
$GLOBALS['egw']->acl->delete_repository('news_admin',$location,false);
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_permissions($user, $inc_groups)
|
|
||||||
{
|
|
||||||
return $GLOBALS['egw']->acl->get_all_location_rights($user,'sitemgr',$inc_groups);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user