[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: admin/inc class.uiaccess_history.inc.php,1.6.2.2
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: admin/inc class.uiaccess_history.inc.php,1.6.2.2.2.3,1.6.2.2.2.4 class.uiaccounts.inc.php,1.23.2.9.2.11,1.23.2.9.2.12 class.uiaclmanager.inc.php,1.5.2.2,1.5.2.2.2.1 class.uiapplications.inc.php,1.3.2.1.2.3,1.3.2.1.2.4 class.uicategories.inc.php,1.6.2.8,1.6.2.8.2.1 class.uiconfig.inc.php,1.6.2.3.2.1,1.6.2.3.2.2 class.uicurrentsessions.inc.php,1.5.4.2,1.5.4.3 class.uilog.inc.php,1.8.4.1,1.8.4.2 class.uimainscreen.inc.php,1.1.4.1,1.1.4.2 class.uimenuclass.inc.php,1.9.2.1,1.9.2.1.2.1 class.uiserver.inc.php,1.3.2.2.2.1,1.3.2.2.2.2 hook_acl_manager.inc.php,1.3.2.1,1.3.2.1.2.1 hook_admin.inc.php,1.26.2.1.2.2,1.26.2.1.2.3 hook_view_user.inc.php,1.2,NONE |
Date: |
Sun, 25 May 2003 11:41:28 -0400 |
Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv14958/inc
Modified Files:
Tag: Version-0_9_16-branch
class.uiaccess_history.inc.php class.uiaccounts.inc.php
class.uiaclmanager.inc.php class.uiapplications.inc.php
class.uicategories.inc.php class.uiconfig.inc.php
class.uicurrentsessions.inc.php class.uilog.inc.php
class.uimainscreen.inc.php class.uimenuclass.inc.php
class.uiserver.inc.php hook_acl_manager.inc.php
hook_admin.inc.php
Removed Files:
Tag: Version-0_9_16-branch
hook_view_user.inc.php
Log Message:
fixes to get acl-manager working
Index: class.uiaccess_history.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaccess_history.inc.php,v
retrieving revision 1.6.2.2.2.3
retrieving revision 1.6.2.2.2.4
diff -C2 -r1.6.2.2.2.3 -r1.6.2.2.2.4
*** class.uiaccess_history.inc.php 18 May 2003 14:10:40 -0000
1.6.2.2.2.3
--- class.uiaccess_history.inc.php 25 May 2003 15:41:25 -0000
1.6.2.2.2.4
***************
*** 21,24 ****
--- 21,29 ----
function uiaccess_history()
{
+ if
($GLOBALS['phpgw']->acl->check('access_log_access',1,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
+
$this->bo =
createobject('admin.boaccess_history');
$this->nextmatchs = createobject('phpgwapi.nextmatchs');
Index: class.uiaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaccounts.inc.php,v
retrieving revision 1.23.2.9.2.11
retrieving revision 1.23.2.9.2.12
diff -C2 -r1.23.2.9.2.11 -r1.23.2.9.2.12
*** class.uiaccounts.inc.php 18 May 2003 20:55:40 -0000 1.23.2.9.2.11
--- class.uiaccounts.inc.php 25 May 2003 15:41:25 -0000 1.23.2.9.2.12
***************
*** 22,27 ****
--- 22,29 ----
'delete_user' => True,
'edit_user' => True,
+ 'edit_user_hook' => True,
'edit_group' => True,
'view_user' => True,
+ 'view_user_hook' => True,
'group_manager' => True,
'accounts_popup' => True
***************
*** 518,521 ****
--- 520,545 ----
}
+ function edit_view_user_hook()
+ {
+ if
(!$GLOBALS['phpgw']->acl->check('current_sessions_access',1,'admin')) //
no rights to view
+ {
+ $GLOBALS['menuData'][] = array(
+ 'description' => 'Login History',
+ 'url' => '/index.php',
+ 'extradata' =>
'menuaction=admin.uiaccess_history.list_history'
+ );
+ }
+ // not sure if this realy belongs here, or only in
edit_user
+ if ($_GET['account_id'] && // can't set it on add
+
!$GLOBALS['phpgw']->acl->check('account_access',64,'admin')) // no
rights to set ACL-rights
+ {
+ $GLOBALS['menuData'][] = array(
+ 'description' => 'ACL Rights',
+ 'url' => '/index.php',
+ 'extradata' =>
'menuaction=admin.uiaclmanager.list_apps'
+ );
+ }
+ }
+
function edit_user($cd='',$account_id='')
{
***************
*** 532,536 ****
$accountid = $account_id;
settype($account_id,'integer');
! $account_id =
($_GET['account_id']?$_GET['account_id']:intval($accountid));
// todo
--- 556,560 ----
$accountid = $account_id;
settype($account_id,'integer');
! $account_id = intval($_GET['account_id'] ?
$_GET['account_id'] : $accountid);
// todo
***************
*** 576,581 ****
'lang_loginid' => lang('LoginID'),
'lang_account_active' => lang('Account
active'),
- 'lang_password' => lang('Password'),
- 'lang_reenter_password' => lang('Re-Enter
Password'),
'lang_lastname' => lang('Last Name'),
'lang_groups' => lang('Groups'),
--- 600,603 ----
***************
*** 598,603 ****
$acl =
CreateObject('phpgwapi.acl',intval($_GET['account_id']));
! $var['anonymous'] =
$acl->check('anonymous',1,'phpgwapi') ? 'X' : '';
! $var['changepassword'] =
$acl->check('changepassword',0xFFFF,'preferences') ? 'X' : '';
unset($acl);
--- 620,625 ----
$acl =
CreateObject('phpgwapi.acl',intval($_GET['account_id']));
! $var['anonymous'] =
$acl->check('anonymous',1,'phpgwapi') ? ' X' : ' ';
! $var['changepassword'] =
$acl->check('changepassword',0xFFFF,'preferences') ? ' X' : ' ';
unset($acl);
***************
*** 653,657 ****
$group_names[] = $group['account_name'];
}
! $var['groups_select'] =
implode(',',$group_names);
}
--- 675,679 ----
$group_names[] = $group['account_name'];
}
! $var['groups_select'] = implode(',
',$group_names);
}
***************
*** 666,675 ****
@asort($availableApps);
@reset($availableApps);
! while ($application = each($availableApps))
{
! if ($application[1]['enabled'] &&
$application[1]['status'] != 2)
{
! $perm_display[$i]['appName'] =
$application[0];
! $perm_display[$i]['title'] =
$application[1]['title'];
$i++;
}
--- 688,697 ----
@asort($availableApps);
@reset($availableApps);
! foreach($availableApps as $app => $data)
{
! if ($data['enabled'] && $data['status'] != 2)
{
! $perm_display[$i]['appName'] = $app;
! $perm_display[$i]['title'] =
$data['title'];
$i++;
}
Index: class.uiaclmanager.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaclmanager.inc.php,v
retrieving revision 1.5.2.2
retrieving revision 1.5.2.2.2.1
diff -C2 -r1.5.2.2 -r1.5.2.2.2.1
*** class.uiaclmanager.inc.php 27 Feb 2003 21:30:35 -0000 1.5.2.2
--- class.uiaclmanager.inc.php 25 May 2003 15:41:25 -0000 1.5.2.2.2.1
***************
*** 24,27 ****
--- 24,32 ----
function uiaclmanager()
{
+ $this->account_id = intval($_GET['account_id']);
+ if (!$this->account_id ||
$GLOBALS['phpgw']->acl->check('account_access',64,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
$this->template =
createobject('phpgwapi.Template',PHPGW_APP_TPL);
}
***************
*** 29,32 ****
--- 34,39 ----
function common_header()
{
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Admin') . ' - ' . lang('ACL Manager') .
+ ': ' .
$GLOBALS['phpgw']->common->grab_owner_name($this->account_id);
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 48,53 ****
$this->template->set_block('app_list','spacer_row');
- $this->template->set_var('lang_header',lang('ACL
Manager'));
-
while (is_array($GLOBALS['acl_manager']) &&
list($app,$locations) = each($GLOBALS['acl_manager']))
{
--- 55,58 ----
***************
*** 55,59 ****
$this->template->set_var('icon_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
$this->template->set_var('link_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
!
$this->template->set_var('app_name',lang($GLOBALS['phpgw_info']['navbar'][$app]['title']));
$this->template->set_var('a_name',$appname);
$this->template->set_var('app_icon',$icon);
--- 60,64 ----
$this->template->set_var('icon_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
$this->template->set_var('link_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
!
$this->template->set_var('app_name',$GLOBALS['phpgw_info']['apps'][$app]['title']);
$this->template->set_var('a_name',$appname);
$this->template->set_var('app_icon',$icon);
***************
*** 70,98 ****
while (is_array($locations) &&
list($loc,$value) = each($locations))
{
! $total_rights = 0;
! while (list($k,$v) =
each($value['rights']))
! {
! $total_rights += $v;
! }
! reset($value['rights']);
!
! // If all of there rights are denied,
then they shouldn't even see the option
! if ($total_rights !=
$GLOBALS['phpgw']->acl->get_rights($loc,$app))
! {
! $link_values = array(
! 'menuaction' =>
'admin.uiaclmanager.access_form',
! 'location' =>
urlencode(base64_encode($loc)),
! 'acl_app' => $app,
! 'account_id' =>
$GLOBALS['account_id']
! );
!
!
$this->template->set_var('link_location',$GLOBALS['phpgw']->link('/index.php',$link_values));
!
$this->template->set_var('lang_location',lang($value['name']));
!
$this->template->fp('rows','link_row',True);
! }
}
$this->template->parse('rows','spacer_row',True);
}
$this->template->pfp('out','list');
}
--- 75,96 ----
while (is_array($locations) &&
list($loc,$value) = each($locations))
{
! $link_values = array(
! 'menuaction' =>
'admin.uiaclmanager.access_form',
! 'location' => urlencode($loc),
! 'acl_app' => $app,
! 'account_id' =>
$this->account_id
! );
!
!
$this->template->set_var('link_location',$GLOBALS['phpgw']->link('/index.php',$link_values));
!
$this->template->set_var('lang_location',lang($value['name']));
!
$this->template->fp('rows','link_row',True);
}
$this->template->parse('rows','spacer_row',True);
}
+ $this->template->set_var(array(
+ 'cancel_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_users'),
+ 'lang_cancel' => lang('Cancel')
+ ));
$this->template->pfp('out','list');
}
***************
*** 100,150 ****
function access_form()
{
!
$GLOBALS['phpgw']->hooks->single('acl_manager',$GLOBALS['acl_app']);
! $location = base64_decode($GLOBALS['location']);
! $acl_manager =
$GLOBALS['acl_manager'][$GLOBALS['acl_app']][$location];
$this->common_header();
$this->template->set_file('form','acl_manager_form.tpl');
! $acc =
createobject('phpgwapi.accounts',$GLOBALS['account_id']);
$acc->read_repository();
$afn =
$GLOBALS['phpgw']->common->display_fullname($acc->data['account_lid'],$acc->data['firstname'],$acc->data['lastname']);
! $this->template->set_var('lang_message',lang('Check
items to <b>%1</b> to %2 for
%3',$acl_manager['name'],$GLOBALS['acl_app'],$afn));
$link_values = array(
! 'menuaction' => 'admin.boaclmanager.submit',
! 'acl_app' => $GLOBALS['acl_app'],
! 'location' => urlencode($GLOBALS['location']),
! 'account_id' => $GLOBALS['account_id']
);
! $acl =
createobject('phpgwapi.acl',$GLOBALS['account_id']);
$acl->read_repository();
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php',$link_values));
- $this->template->set_var('lang_title',lang('ACL
Manager'));
$total = 0;
while (list($name,$value) =
each($acl_manager['rights']))
{
! $grants =
$acl->get_rights($location,$GLOBALS['acl_app']);
!
! if (!
$GLOBALS['phpgw']->acl->check($location,$value,$GLOBALS['acl_app']))
! {
! $s .= '<option value="' . $value . '"';
! $s .= (($grants & $value)?'
selected':'');
! $s .= '>' . lang($name) . '</option>';
! $total++;
! }
! }
!
! $size = 7;
! if ($total < 7)
! {
! $size = $total;
}
! $this->template->set_var('select_values','<select
name="acl_rights[]" multiple size="' . $size . '">' . $s . '</select>');
! $this->template->set_var('lang_submit',lang('Submit'));
$this->template->set_var('lang_cancel',lang('Cancel'));
--- 98,155 ----
function access_form()
{
! $location = $_GET['location'];
! if ($_POST['submit'] || $_POST['cancel'])
! {
! if ($_POST['submit'])
! {
! $total_rights = 0;
! while (is_array($_POST['acl_rights'])
&& list(,$rights) = each($_POST['acl_rights']))
! {
! $total_rights += $rights;
! }
! if ($total_rights)
! {
!
$GLOBALS['phpgw']->acl->add_repository($_GET['acl_app'], $location,
$this->account_id, $total_rights);
! }
! else // we dont need to save 0
rights (= no restrictions)
! {
!
$GLOBALS['phpgw']->acl->delete_repository($_GET['acl_app'], $location,
$this->account_id);
! }
! }
! $this->list_apps();
! return;
! }
!
$GLOBALS['phpgw']->hooks->single('acl_manager',$_GET['acl_app']);
! $acl_manager =
$GLOBALS['acl_manager'][$_GET['acl_app']][$location];
$this->common_header();
$this->template->set_file('form','acl_manager_form.tpl');
! $acc =
createobject('phpgwapi.accounts',$this->account_id);
$acc->read_repository();
$afn =
$GLOBALS['phpgw']->common->display_fullname($acc->data['account_lid'],$acc->data['firstname'],$acc->data['lastname']);
! $this->template->set_var('lang_message',lang('Check
items to <b>%1</b> to %2 for
%3',lang($acl_manager['name']),$GLOBALS['phpgw_info']['apps'][$_GET['acl_app']]['title'],$afn));
$link_values = array(
! 'menuaction' =>
'admin.uiaclmanager.access_form',
! 'acl_app' => $_GET['acl_app'],
! 'location' => urlencode($_GET['location']),
! 'account_id' => $this->account_id
);
! $acl =
createobject('phpgwapi.acl',$this->account_id);
$acl->read_repository();
+ $grants = $acl->get_rights($location,$_GET['acl_app']);
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php',$link_values));
$total = 0;
while (list($name,$value) =
each($acl_manager['rights']))
{
! $cb .= '<input type="checkbox"
name="acl_rights[]" value="'.$value.'"'.($grants & $value ? ' checked' :
'').'> '.lang($name)."<br>\n";
}
! $this->template->set_var('select_values',$cb);
! $this->template->set_var('lang_submit',lang('Save'));
$this->template->set_var('lang_cancel',lang('Cancel'));
Index: class.uiapplications.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiapplications.inc.php,v
retrieving revision 1.3.2.1.2.3
retrieving revision 1.3.2.1.2.4
diff -C2 -r1.3.2.1.2.3 -r1.3.2.1.2.4
*** class.uiapplications.inc.php 27 Apr 2003 21:34:14 -0000
1.3.2.1.2.3
--- class.uiapplications.inc.php 25 May 2003 15:41:25 -0000
1.3.2.1.2.4
***************
*** 33,36 ****
--- 33,45 ----
function get_list()
{
+ if
($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
+ $can_add =
!$GLOBALS['phpgw']->acl->check('applications_access',2,'admin');
+ $can_edit =
!$GLOBALS['phpgw']->acl->check('applications_access',4,'admin');
+ $can_delete =
!$GLOBALS['phpgw']->acl->check('applications_access',8,'admin');
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Admin').' - '.lang('Installed applications');
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 39,42 ****
--- 48,52 ----
$GLOBALS['phpgw']->template->set_block('applications','list','list');
$GLOBALS['phpgw']->template->set_block('applications','row','row');
+
$GLOBALS['phpgw']->template->set_block('applications','add','add');
$start = get_var('start',array('POST','GET'));
***************
*** 93,97 ****
}
-
$GLOBALS['phpgw']->template->set_var('lang_installed',lang('Installed
applications'));
$GLOBALS['phpgw']->template->set_var('bg_color',$GLOBALS['phpgw_info']['theme']['bg_color']);
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
--- 103,106 ----
***************
*** 117,122 ****
$GLOBALS['phpgw']->template->set_var('name',$GLOBALS['phpgw_info']['apps'][$app['name']]['title']);
! $GLOBALS['phpgw']->template->set_var('edit','<a
href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.edit&app_name='
. urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Edit') . ' </a>');
!
$GLOBALS['phpgw']->template->set_var('delete','<a href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete&app_name='
. urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Delete') . '
</a>');
if ($app['status'])
--- 126,131 ----
$GLOBALS['phpgw']->template->set_var('name',$GLOBALS['phpgw_info']['apps'][$app['name']]['title']);
!
$GLOBALS['phpgw']->template->set_var('edit',$can_edit ? '<a href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.edit&app_name='
. urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Edit') . ' </a>' :
' ');
!
$GLOBALS['phpgw']->template->set_var('delete',$can_delete ? '<a href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete&app_name='
. urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Delete') . ' </a>'
: ' ');
if ($app['status'])
***************
*** 132,135 ****
--- 141,152 ----
$GLOBALS['phpgw']->template->parse('rows','row',True);
}
+ if ($can_add)
+ {
+
$GLOBALS['phpgw']->template->parse('addbutton','add');
+ }
+ else
+ {
+
$GLOBALS['phpgw']->template->set_var('addbutton','');
+ }
$GLOBALS['phpgw']->template->pparse('out','list');
***************
*** 146,149 ****
--- 163,170 ----
function add()
{
+ if
($GLOBALS['phpgw']->acl->check('applications_access',2,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
$start = get_var('start',array('POST','GET'));
***************
*** 201,208 ****
}
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
-
$GLOBALS['phpgw']->template->set_var('lang_header',lang('Add new application'));
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
--- 222,229 ----
}
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Admin').' - '.lang('Add new application');
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
***************
*** 237,240 ****
--- 258,265 ----
function edit()
{
+ if
($GLOBALS['phpgw']->acl->check('applications_access',4,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
$app_name = get_var('app_name',array('POST','GET'));
$start = get_var('start',array('POST','GET'));
***************
*** 288,291 ****
--- 313,317 ----
}
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Admin').' - '.lang('Edit application');
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 300,304 ****
list($n_app_name,$n_app_title,$n_app_status,$old_app_name,$app_order) =
$this->bo->read($app_name);
}
-
$GLOBALS['phpgw']->template->set_var('lang_header',lang('Edit application'));
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden"
name="start" value="'.$start.'">'.
'<input type="hidden" name="app_name" value="'
. $app_name . '">');
--- 326,329 ----
***************
*** 327,330 ****
--- 352,359 ----
function delete()
{
+ if
($GLOBALS['phpgw']->acl->check('applications_access',8,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
$app_name = get_var('app_name',array('POST','GET'));
$start = get_var('start',array('POST','GET'));
***************
*** 355,358 ****
--- 384,391 ----
function register_all_hooks()
{
+ if
($GLOBALS['phpgw']->acl->check('applications_access',16,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
if (!is_object($GLOBALS['phpgw']->hooks))
{
Index: class.uicategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uicategories.inc.php,v
retrieving revision 1.6.2.8
retrieving revision 1.6.2.8.2.1
diff -C2 -r1.6.2.8 -r1.6.2.8.2.1
*** class.uicategories.inc.php 3 Mar 2003 22:27:10 -0000 1.6.2.8
--- class.uicategories.inc.php 25 May 2003 15:41:25 -0000 1.6.2.8.2.1
***************
*** 35,42 ****
--- 35,57 ----
function uicategories()
{
+ if
($GLOBALS['phpgw']->acl->check('global_categories_access',1,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
+
$this->bo =
CreateObject('admin.bocategories');
$this->template = $GLOBALS['phpgw']->template;
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
+ $this->acl_search =
!$GLOBALS['phpgw']->acl->check('global_categories_access',2,'admin');
+ $this->acl_add =
!$GLOBALS['phpgw']->acl->check('global_categories_access',4,'admin');
+ $this->acl_view =
!$GLOBALS['phpgw']->acl->check('global_categories_access',8,'admin');
+ $this->acl_edit =
!$GLOBALS['phpgw']->acl->check('global_categories_access',16,'admin');
+ $this->acl_delete =
!$GLOBALS['phpgw']->acl->check('global_categories_access',32,'admin');
+ $this->acl_add_sub=
!$GLOBALS['phpgw']->acl->check('global_categories_access',64,'admin');
+
+ $this->appname = get_var('appname',array('GET','POST'));
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
$GLOBALS['phpgw_info']['apps'][$this->appname ? $this->appname :
'admin']['title'];
+
$this->start = $this->bo->start;
$this->query = $this->bo->query;
***************
*** 80,83 ****
--- 95,100 ----
{
$this->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
+
$this->template->set_var('row_on',$GLOBALS['phpgw_info']['theme']['row_on']);
+
$this->template->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
$this->template->set_var('lang_save',lang('Save'));
$this->template->set_var('lang_search',lang('Search'));
***************
*** 91,104 ****
$this->template->set_var('lang_add',lang('Add'));
$this->template->set_var('lang_reset',lang('Clear
Form'));
! $this->template->set_var('lang_done',lang('Done'));
}
function index()
{
- $GLOBALS['phpgw']->common->phpgw_header();
- echo parse_navbar();
-
$this->template->set_file(array('cat_list_t' =>
'listcats.tpl'));
$this->template->set_block('cat_list_t','cat_list','list');
$this->set_langs();
--- 108,126 ----
$this->template->set_var('lang_add',lang('Add'));
$this->template->set_var('lang_reset',lang('Clear
Form'));
! $this->template->set_var('lang_cancel',lang('Cancel'));
}
function index()
{
$this->template->set_file(array('cat_list_t' =>
'listcats.tpl'));
$this->template->set_block('cat_list_t','cat_list','list');
+ if (!$this->acl_add)
+ {
+
$this->template->set_block('cat_list_t','add','addhandle');
+ }
+ if (!$this->acl_search)
+ {
+
$this->template->set_block('cat_list_t','search','searchhandle');
+ }
$this->set_langs();
***************
*** 107,123 ****
(
'menuaction' => 'admin.uicategories.index',
! 'appname' => $GLOBALS['appname']
);
$this->template->set_var('lang_action',lang('Category
list'));
! if ($GLOBALS['appname'])
! {
!
$this->template->set_var('title_categories',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']
. ' ' . lang('global categories'));
! }
! else
! {
!
$this->template->set_var('title_categories',lang('Global categories'));
! }
$this->template->set_var('query',$this->query);
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
--- 129,141 ----
(
'menuaction' => 'admin.uicategories.index',
! 'appname' => $this->appname
);
$this->template->set_var('lang_action',lang('Category
list'));
! $GLOBALS['phpgw_info']['flags']['app_header'] .= ' -
'.lang('Global categories');
! $GLOBALS['phpgw']->common->phpgw_header();
! echo parse_navbar();
!
$this->template->set_var('query',$this->query);
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
***************
*** 166,170 ****
}
! if ($GLOBALS['appname'] &&
$categories[$i]['app_name'] == 'phpgw')
{
$appendix = '<' . lang('Global') .
'>';
--- 184,188 ----
}
! if ($this->appname &&
$categories[$i]['app_name'] == 'phpgw')
{
$appendix = '<' . lang('Global') .
'>';
***************
*** 181,194 ****
));
! $link_data['menuaction'] =
'admin.uicategories.add';
! $link_data['cat_parent'] = $id;
!
$this->template->set_var('add_sub',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$this->template->set_var('lang_sub_entry',lang('Add sub'));
!
! if ($GLOBALS['appname'] &&
$categories[$i]['app_name'] == $GLOBALS['appname'])
{
$show_edit_del = True;
}
! elseif(!$GLOBALS['appname'] &&
$categories[$i]['app_name'] == 'phpgw')
{
$show_edit_del = True;
--- 199,214 ----
));
! if ($this->acl_add_sub)
! {
! $link_data['menuaction'] =
'admin.uicategories.add';
! $link_data['cat_parent'] = $id;
! $this->template->set_var('add_sub','<a
href="'.$GLOBALS['phpgw']->link('/index.php',$link_data).'">'.
! lang('Add sub').'</a>');
! }
! if ($this->appname &&
$categories[$i]['app_name'] == $this->appname)
{
$show_edit_del = True;
}
! elseif(!$this->appname &&
$categories[$i]['app_name'] == 'phpgw')
{
$show_edit_del = True;
***************
*** 199,223 ****
}
! if ($show_edit_del)
{
- $link_data['cat_id'] = $id;
$link_data['menuaction'] =
'admin.uicategories.edit';
!
$this->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$this->template->set_var('lang_edit_entry',lang('Edit'));
!
! $link_data['menuaction'] =
'admin.uicategories.delete';
!
$this->template->set_var('delete',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$this->template->set_var('lang_delete_entry',lang('Delete'));
}
else
{
$this->template->set_var('edit','');
!
$this->template->set_var('lang_edit_entry',' ');
$this->template->set_var('delete','');
-
$this->template->set_var('lang_delete_entry',' ');
}
$this->template->fp('list','cat_list',True);
}
-
$link_data['menuaction'] = 'admin.uicategories.add';
$link_data['cat_parent'] = '';
--- 219,245 ----
}
! $link_data['cat_id'] = $id;
! if ($show_edit_del && $this->acl_edit)
{
$link_data['menuaction'] =
'admin.uicategories.edit';
! $this->template->set_var('edit','<a
href="'.$GLOBALS['phpgw']->link('/index.php',$link_data).'">'.
! lang('Edit').'</a>');
}
else
{
$this->template->set_var('edit','');
! }
! if ($show_edit_del && $this->acl_delete)
! {
! $link_data['menuaction'] =
'admin.uicategories.delete';
! $this->template->set_var('delete','<a
href="'.$GLOBALS['phpgw']->link('/index.php',$link_data).'">'.
! lang('Delete').'</a>');
! }
! else
! {
$this->template->set_var('delete','');
}
$this->template->fp('list','cat_list',True);
}
$link_data['menuaction'] = 'admin.uicategories.add';
$link_data['cat_parent'] = '';
***************
*** 230,239 ****
function add()
{
$link_data = array
(
'menuaction' => 'admin.uicategories.index',
! 'appname' => $GLOBALS['appname']
);
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
--- 252,281 ----
function add()
{
+ $new_parent = $_POST['new_parent'];
+ $cat_parent =
intval(get_var('cat_parent',array('POST','GET')));
+ $cat_name = $_POST['cat_name'];
+ $cat_description = $_POST['cat_description'];
+ if ($new_parent)
+ {
+ $cat_parent = intval($new_parent);
+ }
+
+ if (!$this->acl_add && $cat_parent == 0 ||
+ !$this->acl_add_sub && $cat_parent != 0)
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
$link_data = array
(
'menuaction' => 'admin.uicategories.index',
! 'appname' => $this->appname
);
+ if ($_POST['cancel'])
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
+ }
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] .= ' -
'.lang('Add global category');
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 241,271 ****
$this->set_langs();
- $new_parent =
$GLOBALS['HTTP_POST_VARS']['new_parent'];
- $submit =
$GLOBALS['HTTP_POST_VARS']['submit'];
- $cat_parent =
$GLOBALS['HTTP_POST_VARS']['cat_parent'] ?
$GLOBALS['HTTP_POST_VARS']['cat_parent'] :
$GLOBALS['HTTP_GET_VARS']['cat_parent'];
- $cat_name =
$GLOBALS['HTTP_POST_VARS']['cat_name'];
- $cat_description =
$GLOBALS['HTTP_POST_VARS']['cat_description'];
-
$this->template->set_file(array('form' =>
'category_form.tpl'));
! $this->template->set_block('form','add','addhandle');
! $this->template->set_block('form','edit','edithandle');
!
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
! if ($GLOBALS['appname'])
! {
!
$this->template->set_var('title_categories',lang('Add global category for
%1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
! }
! else
! {
!
$this->template->set_var('title_categories',lang('Add global category'));
! }
!
! if ($new_parent)
! {
! $cat_parent = $new_parent;
! }
!
! if ($submit)
{
$values = array
--- 283,290 ----
$this->set_langs();
$this->template->set_file(array('form' =>
'category_form.tpl'));
!
$this->template->set_block('form','delete','deletehandle');
! if ($_POST['save'])
{
$values = array
***************
*** 292,325 ****
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$this->template->set_var('category_list',$this->bo->formatted_list(array('select'
=> 'select','all' => 'all','cat_parent' => $cat_parent)));
$this->template->set_var('cat_name',$cat_name);
$this->template->set_var('cat_description',$cat_description);
- $this->template->set_var('edithandle','');
- $this->template->set_var('addhandle','');
$this->template->pfp('out','form');
- $this->template->pfp('addhandle','add');
}
function edit()
{
! $new_parent =
$GLOBALS['HTTP_POST_VARS']['new_parent'];
! $submit =
$GLOBALS['HTTP_POST_VARS']['submit'];
! $cat_parent =
$GLOBALS['HTTP_POST_VARS']['cat_parent'];
! $cat_name =
$GLOBALS['HTTP_POST_VARS']['cat_name'];
! $cat_description =
$GLOBALS['HTTP_POST_VARS']['cat_description'];
! $old_parent =
$GLOBALS['HTTP_POST_VARS']['old_parent'];
$link_data = array
(
'menuaction' => 'admin.uicategories.index',
! 'appname' => $GLOBALS['appname']
);
! if (!$this->cat_id)
{
! Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
--- 311,359 ----
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
! if ($this->acl_add)
! {
! $none_option = '<option
value="0">'.lang('None').'</option>';
! }
!
$this->template->set_var('category_list',$none_option.$this->bo->formatted_list(array('select'
=> 'select','all' => 'all','cat_parent' => $cat_parent)),True);
$this->template->set_var('cat_name',$cat_name);
$this->template->set_var('cat_description',$cat_description);
$this->template->pfp('out','form');
}
function edit()
{
! if (!$this->acl_edit)
! {
! $GLOBALS['phpgw']->redirect_link('/index.php');
! }
! $new_parent =
intval($_POST['new_parent']);
! $cat_parent =
intval($_POST['cat_parent']);
! $cat_name = $_POST['cat_name'];
! $cat_description = $_POST['cat_description'];
! $old_parent =
intval($_POST['old_parent']);
!
! if ($new_parent)
! {
! $cat_parent = $new_parent;
! }
$link_data = array
(
'menuaction' => 'admin.uicategories.index',
! 'appname' => $this->appname
);
! if ($_POST['cancel'] || !$this->cat_id)
! {
!
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
! }
! if ($_POST['delete'])
{
! $this->delete();
! return;
}
+ $GLOBALS['phpgw_info']['flags']['app_header'] .= ' -
'.lang('Edit global category');
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 328,342 ****
$this->template->set_file(array('form' =>
'category_form.tpl'));
! $this->template->set_block('form','add','addhandle');
! $this->template->set_block('form','edit','edithandle');
!
!
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
! if ($new_parent)
{
! $cat_parent = $new_parent;
}
! if ($submit)
{
$values = array
--- 362,371 ----
$this->template->set_file(array('form' =>
'category_form.tpl'));
! if (!$this->acl_delete)
{
!
$this->template->set_block('form','delete','deletehandle');
}
! if ($_POST['save'])
{
$values = array
***************
*** 364,376 ****
$cats = $this->bo->cats->return_single($this->cat_id);
- if ($GLOBALS['appname'])
- {
-
$this->template->set_var('title_categories',lang('Edit global category for
%1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
- }
- else
- {
-
$this->template->set_var('title_categories',lang('Edit global category'));
- }
-
$hidden_vars = '<input type="hidden" name="cat_id"
value="' . $this->cat_id . '">' . "\n"
. '<input type="hidden"
name="old_parent" value="' . $cats[0]['parent'] . '">' . "\n";
--- 393,396 ----
***************
*** 387,412 ****
$this->template->set_var('category_list',$this->bo->formatted_list(array('select'
=> 'select','all' => 'all', 'cat_parent' => $cats[0]['parent'])));
- $this->template->set_var('edithandle','');
- $this->template->set_var('addhandle','');
$this->template->pfp('out','form');
- $this->template->pfp('edithandle','edit');
}
function delete()
{
$link_data = array
(
'menuaction' => 'admin.uicategories.index',
! 'appname' => $GLOBALS['appname']
);
! if (!$this->cat_id)
{
! Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
! if ($GLOBALS['HTTP_POST_VARS']['confirm'])
{
! if ($GLOBALS['HTTP_POST_VARS']['subs'])
{
$this->bo->delete($this->cat_id,True);
--- 407,433 ----
$this->template->set_var('category_list',$this->bo->formatted_list(array('select'
=> 'select','all' => 'all', 'cat_parent' => $cats[0]['parent'])));
$this->template->pfp('out','form');
}
function delete()
{
+ if (!$this->acl_delete)
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
$link_data = array
(
'menuaction' => 'admin.uicategories.index',
! 'appname' => $this->appname
);
! if (!$this->cat_id || $_POST['cancel'])
{
!
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
}
! if ($_POST['confirm'])
{
! if ($_POST['subs'])
{
$this->bo->delete($this->cat_id,True);
***************
*** 416,498 ****
$this->bo->delete($this->cat_id);
}
! Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
else
{
!
$this->template->set_file(array('category_delete' => 'delete_cat.tpl'));
!
$this->template->set_block('category_delete','delete','deletehandle');
!
$this->template->set_block('category_delete','done','donehandle');
! $nolink =
$GLOBALS['phpgw']->link('/index.php',$link_data);
! if ($GLOBALS['appname'])
! {
! $type = 'noglobalapp';
! }
! else
! {
! $type = 'noglobal';
! }
! $apps_cats = $this->bo->exists(array
(
! 'type' => $type,
'cat_name' => '',
'cat_id' => $this->cat_id
));
! $GLOBALS['phpgw']->common->phpgw_header();
! echo parse_navbar();
!
! $hidden_vars = '<input type="hidden"
name="cat_id" value="' . $this->cat_id . '">' . "\n";
!
$this->template->set_var('hidden_vars',$hidden_vars);
!
! if ($apps_cats)
{
!
$this->template->set_var('messages',lang('This category is currently being used
by applications as a parent category') . '<br>'
! . lang('You will need to remove
the subcategories before you can delete this category'));
!
!
$this->template->set_var('lang_subs','');
! $this->template->set_var('subs','');
!
$this->template->set_var('nolink',$nolink);
!
$this->template->set_var('deletehandle','');
!
$this->template->set_var('donehandle','');
!
$this->template->pfp('out','category_delete');
!
$this->template->pfp('donehandle','done');
}
else
{
!
$this->template->set_var('messages',lang('Are you sure you want to delete this
category ?'));
!
! $exists = $this->bo->exists(array
! (
! 'type' => 'subs',
! 'cat_name' => '',
! 'cat_id' => $this->cat_id
! ));
!
! if ($exists)
! {
!
$this->template->set_var('lang_subs',lang('Do you also want to delete all
global subcategories ?'));
!
$this->template->set_var('subs','<input type="checkbox" name="subs"
value="True">');
! }
! else
! {
!
$this->template->set_var('lang_subs','');
!
$this->template->set_var('subs', '');
! }
!
!
$this->template->set_var('nolink',$nolink);
!
$this->template->set_var('lang_no',lang('No'));
!
! $link_data['menuaction'] =
'admin.uicategories.delete';
! $link_data['cat_id'] = $this->cat_id;
!
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$this->template->set_var('lang_yes',lang('Yes'));
!
$this->template->set_var('deletehandle','');
!
$this->template->set_var('donehandle','');
!
$this->template->pfp('out','category_delete');
!
$this->template->pfp('deletehandle','delete');
}
}
}
--- 437,513 ----
$this->bo->delete($this->cat_id);
}
!
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
! }
! $this->template->set_file(array('category_delete' =>
'delete_cat.tpl'));
!
! if ($this->appname)
! {
! $type = 'noglobalapp';
}
else
{
! $type = 'noglobal';
! }
! $apps_cats = $this->bo->exists(array
! (
! 'type' => $type,
! 'cat_name' => '',
! 'cat_id' => $this->cat_id
! ));
! $GLOBALS['phpgw_info']['flags']['app_header'] .= ' -
'.lang('Delete category');
! $GLOBALS['phpgw']->common->phpgw_header();
! echo parse_navbar();
!
! $hidden_vars = '<input type="hidden" name="cat_id"
value="' . $this->cat_id . '">' . "\n";
! $this->template->set_var('hidden_vars',$hidden_vars);
! $cats = $this->bo->cats->return_single($this->cat_id);
! $this->template->set_var('cat_name',$cats[0]['name']);
!
! if ($apps_cats)
! {
!
$this->template->set_block('category_delete','delete','deletehandle');
! $this->template->set_var('messages',lang('This
category is currently being used by applications as a parent category') . '<br>'
! . lang('You will need to remove the
subcategories before you can delete this category'));
!
! $this->template->set_var('lang_subs','');
! $this->template->set_var('subs','');
! $this->template->set_var('nolink',$nolink);
! $this->template->set_var('deletehandle','');
! $this->template->set_var('donehandle','');
! $this->template->set_var('lang_ok',lang('Ok'));
! $this->template->pfp('out','category_delete');
! }
! else
! {
!
$this->template->set_block('category_delete','done','donehandle');
! $this->template->set_var('messages',lang('Are
you sure you want to delete this category ?'));
!
! $exists = $this->bo->exists(array
(
! 'type' => 'subs',
'cat_name' => '',
'cat_id' => $this->cat_id
));
! if ($exists)
{
!
$this->template->set_var('lang_subs',lang('Do you also want to delete all
global subcategories ?'));
! $this->template->set_var('subs','<input
type="checkbox" name="subs" value="True">');
}
else
{
!
$this->template->set_var('lang_subs','');
! $this->template->set_var('subs', '');
}
+
+ $link_data['menuaction'] =
'admin.uicategories.delete';
+ $link_data['cat_id'] = $this->cat_id;
+
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
+
$this->template->set_var('lang_yes',lang('Yes'));
+ $this->template->set_var('lang_no',lang('No'));
+ $this->template->pfp('out','category_delete');
}
}
Index: class.uiconfig.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiconfig.inc.php,v
retrieving revision 1.6.2.3.2.1
retrieving revision 1.6.2.3.2.2
diff -C2 -r1.6.2.3.2.1 -r1.6.2.3.2.2
*** class.uiconfig.inc.php 18 May 2003 05:57:43 -0000 1.6.2.3.2.1
--- class.uiconfig.inc.php 25 May 2003 15:41:25 -0000 1.6.2.3.2.2
***************
*** 19,22 ****
--- 19,27 ----
function index()
{
+ if
($GLOBALS['phpgw']->acl->check('site_config_access',1,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
+
switch($_GET['appname'])
{
***************
*** 40,44 ****
case '':
/* This keeps the admin from getting
into what is a setup-only config */
! Header('Location:
'.$GLOBALS['phpgw']->link('/admin/index.php'));
break;
default:
--- 45,49 ----
case '':
/* This keeps the admin from getting
into what is a setup-only config */
!
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
break;
default:
***************
*** 63,69 ****
}
! if ($_POST['cancel'])
{
! Header('Location:
'.$GLOBALS['phpgw']->link('/admin/index.php'));
}
--- 68,74 ----
}
! if ($_POST['cancel'] || $_POST['submit'] &&
$GLOBALS['phpgw']->acl->check('site_config_access',2,'admin'))
{
!
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
}
***************
*** 119,124 ****
if(!$errors)
{
! Header('Location:
'.$GLOBALS['phpgw']->link('/admin/index.php'));
! $GLOBALS['phpgw']->common->phpgw_exit();
}
}
--- 124,128 ----
if(!$errors)
{
!
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
}
}
***************
*** 233,238 ****
$t->pfp('out','body');
! $t->set_var('lang_submit', lang('submit'));
! $t->set_var('lang_cancel', lang('cancel'));
$t->pfp('out','footer');
}
--- 237,242 ----
$t->pfp('out','body');
! $t->set_var('lang_submit',
$GLOBALS['phpgw']->acl->check('site_config_access',2,'admin') ? lang('Cancel')
: lang('Save'));
! $t->set_var('lang_cancel', lang('Cancel'));
$t->pfp('out','footer');
}
Index: class.uicurrentsessions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uicurrentsessions.inc.php,v
retrieving revision 1.5.4.2
retrieving revision 1.5.4.3
diff -C2 -r1.5.4.2 -r1.5.4.3
*** class.uicurrentsessions.inc.php 18 May 2003 14:10:40 -0000 1.5.4.2
--- class.uicurrentsessions.inc.php 25 May 2003 15:41:25 -0000 1.5.4.3
***************
*** 24,27 ****
--- 24,31 ----
function uicurrentsessions()
{
+ if
($GLOBALS['phpgw']->acl->check('current_sessions_access',1,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
$this->template =
createobject('phpgwapi.Template',PHPGW_APP_TPL);
$this->bo =
createobject('admin.bocurrentsessions');
***************
*** 80,92 ****
$this->template->set_block('current','row','row');
! if (!
$GLOBALS['phpgw']->acl->check('current_sessions_access',4,'admin'))
! {
! $can_view_ip = True;
! }
!
! if (!
$GLOBALS['phpgw']->acl->check('current_sessions_access',2,'admin'))
! {
! $can_view_action = True;
! }
$total = $this->bo->total();
--- 84,90 ----
$this->template->set_block('current','row','row');
! $can_view_action =
!$GLOBALS['phpgw']->acl->check('current_sessions_access',2,'admin');
! $can_view_ip =
!$GLOBALS['phpgw']->acl->check('current_sessions_access',4,'admin');
! $can_kill =
!$GLOBALS['phpgw']->acl->check('current_sessions_access',8,'admin');
$total = $this->bo->total();
***************
*** 117,128 ****
$this->template->set_var('row_loginid',$value['session_lid']);
! if ($can_view_ip)
! {
!
$this->template->set_var('row_ip',$value['session_ip']);
! }
! else
! {
!
$this->template->set_var('row_ip',' -- ');
! }
$this->template->set_var('row_logintime',$value['session_logintime']);
--- 115,119 ----
$this->template->set_var('row_loginid',$value['session_lid']);
!
$this->template->set_var('row_ip',$can_view_ip?$value['session_ip']:' ');
$this->template->set_var('row_logintime',$value['session_logintime']);
***************
*** 133,140 ****
$this->template->set_var('row_action',$GLOBALS['phpgw']->strip_html($value['session_action']));
}
- elseif(! $can_view_action)
- {
-
$this->template->set_var('row_action',' -- ');
- }
else
{
--- 124,127 ----
***************
*** 142,146 ****
}
! if ($value['session_id'] !=
$GLOBALS['phpgw_info']['user']['sessionid'] && !
$GLOBALS['phpgw']->acl->check('current_sessions_access',8,'admin'))
{
$this->template->set_var('row_kill','<a
href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.kill&ksession='
--- 129,133 ----
}
! if ($value['session_id'] !=
$GLOBALS['phpgw_info']['user']['sessionid'] && $can_kill)
{
$this->template->set_var('row_kill','<a
href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.kill&ksession='
***************
*** 162,169 ****
if
($GLOBALS['phpgw']->acl->check('current_sessions_access',8,'admin'))
{
! $this->list_sessions();
! return False;
}
-
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Admin').' - '.lang('Kill session');
$this->header();
--- 149,154 ----
if
($GLOBALS['phpgw']->acl->check('current_sessions_access',8,'admin'))
{
! $GLOBALS['phpgw']->redirect_link('/index.php');
}
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Admin').' - '.lang('Kill session');
$this->header();
Index: class.uilog.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uilog.inc.php,v
retrieving revision 1.8.4.1
retrieving revision 1.8.4.2
diff -C2 -r1.8.4.1 -r1.8.4.2
*** class.uilog.inc.php 18 May 2003 14:10:40 -0000 1.8.4.1
--- class.uilog.inc.php 25 May 2003 15:41:25 -0000 1.8.4.2
***************
*** 27,30 ****
--- 27,35 ----
function uilog()
{
+ if
($GLOBALS['phpgw']->acl->check('error_log_access',1,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
+
$_cols = $GLOBALS['HTTP_POST_VARS']['_cols'];
$nocols = $GLOBALS['HTTP_POST_VARS']['nocols'];
Index: class.uimainscreen.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uimainscreen.inc.php,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -C2 -r1.1.4.1 -r1.1.4.2
*** class.uimainscreen.inc.php 3 Apr 2003 17:05:40 -0000 1.1.4.1
--- class.uimainscreen.inc.php 25 May 2003 15:41:25 -0000 1.1.4.2
***************
*** 23,29 ****
function index()
{
! if ($GLOBALS['HTTP_POST_VARS']['cancel'])
{
! header('Location: ' .
$GLOBALS['phpgw']->link('/admin/index.php'));
}
--- 23,43 ----
function index()
{
! $section = addslashes($_POST['section']);
! $select_lang = addslashes($_POST['select_lang']);
! $message = addslashes($_POST['message']);
!
! $acl_ok = array();
! if
(!$GLOBALS['phpgw']->acl->check('mainscreen_message_access',1,'admin'))
! {
! $acl_ok['mainscreen'] = True;
! }
! if
(!$GLOBALS['phpgw']->acl->check('mainscreen_message_access',2,'admin'))
{
! $acl_ok['loginscreen'] = True;
! }
! if ($_POST['cancel'] && !isset($_POST['message']) ||
! !count($acl_ok) || $_POST['submit'] &&
!isset($acl_ok[$section]))
! {
!
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
}
***************
*** 33,55 ****
$GLOBALS['phpgw']->template->set_block('message','row_2','row_2');
! $section = $GLOBALS['HTTP_POST_VARS']['section'];
! $select_lang =
$GLOBALS['HTTP_POST_VARS']['select_lang'];
! $message = $GLOBALS['HTTP_POST_VARS']['message'];
!
! $GLOBALS['phpgw']->common->phpgw_header();
! echo parse_navbar();
!
! if ($GLOBALS['HTTP_POST_VARS']['submit'])
{
$GLOBALS['phpgw']->db->query("DELETE FROM
phpgw_lang WHERE message_id='$section" . "_message' AND app_name='"
. "$section' AND
lang='$select_lang'",__LINE__,__FILE__);
$GLOBALS['phpgw']->db->query("INSERT INTO
phpgw_lang VALUES ('$section" . "_message','$section','$select_lang','"
! . addslashes($message) .
"')",__LINE__,__FILE__);
$message = '<center>'.lang('message has been
updated').'</center>';
}
! if (empty($select_lang))
{
-
$GLOBALS['phpgw']->template->set_var('header_lang',lang('Main screen message'));
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index'));
$GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw_info']['theme']['th_bg']);
--- 47,81 ----
$GLOBALS['phpgw']->template->set_block('message','row_2','row_2');
! if ($_POST['submit'])
{
$GLOBALS['phpgw']->db->query("DELETE FROM
phpgw_lang WHERE message_id='$section" . "_message' AND app_name='"
. "$section' AND
lang='$select_lang'",__LINE__,__FILE__);
$GLOBALS['phpgw']->db->query("INSERT INTO
phpgw_lang VALUES ('$section" . "_message','$section','$select_lang','"
! . $message . "')",__LINE__,__FILE__);
$message = '<center>'.lang('message has been
updated').'</center>';
+
+ $section = '';
+ }
+ if ($_POST['cancel']) // back to
section/lang-selection
+ {
+ $message = $section = '';
}
+ switch ($section)
+ {
+ case 'mainscreen':
+
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Edit
main screen message') . ': '.strtoupper($select_lang);
+ break;
+ case 'loginscreen':
+
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Edit
login screen message') . ': '.strtoupper($select_lang);
+ break;
+ default:
+
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Main
screen message');
+ break;
+ }
+ $GLOBALS['phpgw']->common->phpgw_header();
+ echo parse_navbar();
! if (empty($section))
{
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index'));
$GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw_info']['theme']['th_bg']);
***************
*** 60,64 ****
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
! $select_lang = '<select name="select_lang">';
$GLOBALS['phpgw']->db->query("SELECT
lang,phpgw_languages.lang_name,phpgw_languages.lang_id FROM
phpgw_lang,phpgw_languages WHERE "
.
"phpgw_lang.lang=phpgw_languages.lang_id GROUP BY
lang,phpgw_languages.lang_name,"
--- 86,90 ----
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
! $lang_select = '<select name="select_lang">';
$GLOBALS['phpgw']->db->query("SELECT
lang,phpgw_languages.lang_name,phpgw_languages.lang_id FROM
phpgw_lang,phpgw_languages WHERE "
.
"phpgw_lang.lang=phpgw_languages.lang_id GROUP BY
lang,phpgw_languages.lang_name,"
***************
*** 66,82 ****
while ($GLOBALS['phpgw']->db->next_record())
{
! $select_lang .= '<option value="' .
$GLOBALS['phpgw']->db->f('lang') . '">' . $GLOBALS['phpgw']->db->f('lang_id')
! . ' - ' .
$GLOBALS['phpgw']->db->f('lang_name') . '</option>';
}
! $select_lang .= '</select>';
$GLOBALS['phpgw']->template->set_var('label',lang('Language'));
!
$GLOBALS['phpgw']->template->set_var('value',$select_lang);
$GLOBALS['phpgw']->template->fp('rows','row',True);
$tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
! $select_section = '<select
name="section"><option value="mainscreen">' . lang('Main screen')
! . '</option><option
value="loginscreen">' . lang("Login screen") . '</option>'
! . '</select>';
$GLOBALS['phpgw']->template->set_var('label',lang('Section'));
$GLOBALS['phpgw']->template->set_var('value',$select_section);
--- 92,114 ----
while ($GLOBALS['phpgw']->db->next_record())
{
! $lang =
$GLOBALS['phpgw']->db->f('lang');
! $lang_select .= '<option value="' .
$lang . '"'.($lang == $select_lang ? ' selected' : '').'>' .
! $lang . ' - ' .
$GLOBALS['phpgw']->db->f('lang_name') . "</option>\n";
}
! $lang_select .= '</select>';
$GLOBALS['phpgw']->template->set_var('label',lang('Language'));
!
$GLOBALS['phpgw']->template->set_var('value',$lang_select);
$GLOBALS['phpgw']->template->fp('rows','row',True);
$tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
! $select_section = '<select
name="section">'."\n";
! foreach($acl_ok as $key => $val)
! {
! $select_section .= ' <option
value="'.$key.'"'.
! ($key == $_POST['section'] ? '
selected' : '') . '>' .
! ($key == 'mainscreen' ?
lang('Main screen') : lang("Login screen")) . "</option>\n";
! }
! $select_section .= '</select>';
$GLOBALS['phpgw']->template->set_var('label',lang('Section'));
$GLOBALS['phpgw']->template->set_var('value',$select_section);
***************
*** 85,89 ****
$tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
!
$GLOBALS['phpgw']->template->set_var('value','<input type="submit" value="' .
lang('Submit')
. '"><input type="submit" name="cancel"
value="'. lang('cancel') .'">');
$GLOBALS['phpgw']->template->fp('rows','row_2',True);
--- 117,121 ----
$tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
!
$GLOBALS['phpgw']->template->set_var('value','<input type="submit" value="' .
lang('Edit')
. '"><input type="submit" name="cancel"
value="'. lang('cancel') .'">');
$GLOBALS['phpgw']->template->fp('rows','row_2',True);
***************
*** 96,108 ****
$current_message =
$GLOBALS['phpgw']->db->f('content');
- if ($section == 'mainscreen')
- {
-
$GLOBALS['phpgw']->template->set_var('header_lang',lang('Edit main screen
message'));
- }
- else
- {
-
$GLOBALS['phpgw']->template->set_var('header_lang',lang('Edit login screen
message'));
- }
-
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index'));
$GLOBALS['phpgw']->template->set_var('select_lang',$select_lang);
--- 128,131 ----
***************
*** 119,123 ****
$tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
!
$GLOBALS['phpgw']->template->set_var('value','<input type="submit"
name="submit" value="' . lang('Update')
. '"><input type="submit" name="cancel"
value="'. lang('cancel') .'">'
);
--- 142,146 ----
$tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
!
$GLOBALS['phpgw']->template->set_var('value','<input type="submit"
name="submit" value="' . lang('Save')
. '"><input type="submit" name="cancel"
value="'. lang('cancel') .'">'
);
Index: class.uimenuclass.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uimenuclass.inc.php,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.1.2.1
diff -C2 -r1.9.2.1 -r1.9.2.1.2.1
*** class.uimenuclass.inc.php 12 Mar 2003 14:08:52 -0000 1.9.2.1
--- class.uimenuclass.inc.php 25 May 2003 15:41:25 -0000 1.9.2.1.2.1
***************
*** 53,61 ****
if (!empty($value['extradata']))
{
! $link =
$GLOBALS['phpgw']->link($value['url'],'account_id=' . $GLOBALS['account_id'] .
'&' . $value['extradata']);
}
else
{
! $link =
$GLOBALS['phpgw']->link($value['url'],'account_id=' . $GLOBALS['account_id']);
}
$this->section_item($link,lang($value['description']),$this->rowColor[($i %
2)]);
--- 53,61 ----
if (!empty($value['extradata']))
{
! $link =
$GLOBALS['phpgw']->link($value['url'],'account_id=' .
get_var('account_id',array('GET','POST')) . '&' . $value['extradata']);
}
else
{
! $link =
$GLOBALS['phpgw']->link($value['url'],'account_id=' .
get_var('account_id',array('GET','POST')));
}
$this->section_item($link,lang($value['description']),$this->rowColor[($i %
2)]);
***************
*** 119,123 ****
$GLOBALS['phpgw']->hooks->process($_hookname);
-
if (count($GLOBALS['menuData']) >= 1)
{
--- 119,122 ----
Index: class.uiserver.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiserver.inc.php,v
retrieving revision 1.3.2.2.2.1
retrieving revision 1.3.2.2.2.2
diff -C2 -r1.3.2.2.2.1 -r1.3.2.2.2.2
*** class.uiserver.inc.php 5 Apr 2003 03:52:10 -0000 1.3.2.2.2.1
--- class.uiserver.inc.php 25 May 2003 15:41:25 -0000 1.3.2.2.2.2
***************
*** 34,37 ****
--- 34,47 ----
function uiserver()
{
+ if
($GLOBALS['phpgw']->acl->check('peer_server_access',1,'admin'))
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
+ $this->acl_search =
!$GLOBALS['phpgw']->acl->check('peer_server_access',2,'admin');
+ $this->acl_add =
!$GLOBALS['phpgw']->acl->check('peer_server_access',4,'admin');
+ $this->acl_view =
!$GLOBALS['phpgw']->acl->check('peer_server_access',8,'admin');
+ $this->acl_edit =
!$GLOBALS['phpgw']->acl->check('peer_server_access',16,'admin');
+ $this->acl_delete =
!$GLOBALS['phpgw']->acl->check('peer_server_access',32,'admin');
+
$this->bo = createobject('admin.boserver',True);
$this->nextmatchs = createobject('phpgwapi.nextmatchs');
***************
*** 71,75 ****
}
! function
formatted_list($name,$list,$id='',$default=False,$java=False)
{
$select = "\n" .'<select name="' . $name . '"' . ">\n";
--- 81,85 ----
}
! function formatted_list($name,$list,$id='',$default=False)
{
$select = "\n" .'<select name="' . $name . '"' . ">\n";
***************
*** 95,98 ****
--- 105,109 ----
function list_servers()
{
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Admin').' - '.lang('Peer Servers');
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 100,108 ****
$GLOBALS['phpgw']->template->set_file(array('server_list_t' =>
'listservers.tpl'));
$GLOBALS['phpgw']->template->set_block('server_list_t','server_list','list');
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Server List'));
$GLOBALS['phpgw']->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit'));
$GLOBALS['phpgw']->template->set_var('lang_add',lang('Add'));
-
$GLOBALS['phpgw']->template->set_var('title_servers',lang('Peer Servers'));
$GLOBALS['phpgw']->template->set_var('lang_search',lang('Search'));
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers'));
--- 111,126 ----
$GLOBALS['phpgw']->template->set_file(array('server_list_t' =>
'listservers.tpl'));
$GLOBALS['phpgw']->template->set_block('server_list_t','server_list','list');
+ if (!$this->acl_search)
+ {
+
$GLOBALS['phpgw']->template->set_block('server_list_t','search','searchhandle');
+ }
+ if (!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->template->set_block('server_list_t','add','addhandle');
+ }
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Server List'));
$GLOBALS['phpgw']->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit'));
$GLOBALS['phpgw']->template->set_var('lang_add',lang('Add'));
$GLOBALS['phpgw']->template->set_var('lang_search',lang('Search'));
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers'));
***************
*** 161,169 ****
));
!
$GLOBALS['phpgw']->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit&server_id='
. $server_id));
!
$GLOBALS['phpgw']->template->set_var('lang_edit_entry',lang('Edit'));
!
!
$GLOBALS['phpgw']->template->set_var('delete',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.delete&server_id='
. $server_id));
!
$GLOBALS['phpgw']->template->set_var('lang_delete_entry',lang('Delete'));
$GLOBALS['phpgw']->template->parse('list','server_list',True);
}
--- 179,194 ----
));
! $GLOBALS['phpgw']->template->set_var('edit','');
!
$GLOBALS['phpgw']->template->set_var('delete','');
! if ($this->acl_edit)
! {
!
$GLOBALS['phpgw']->template->set_var('edit','<a
href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit&server_id='
. $server_id).
! '">'.lang('Edit').'</a>');
! }
! if ($this->acl_delete)
! {
!
$GLOBALS['phpgw']->template->set_var('delete','<a
href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.delete&server_id='
. $server_id).
! '">'.lang('Delete').'</a>');
! }
$GLOBALS['phpgw']->template->parse('list','server_list',True);
}
***************
*** 186,196 ****
}
$server_id = get_var('server_id',array('POST','GET'));
!
$is = CreateObject('phpgwapi.interserver');
$GLOBALS['phpgw']->template->set_file(array('form' =>
'server_form.tpl'));
-
$GLOBALS['phpgw']->template->set_block('form','add','addhandle');
-
$GLOBALS['phpgw']->template->set_block('form','edit','edithandle');
$server = $this->bo->read($server_id);
--- 211,228 ----
}
$server_id = get_var('server_id',array('POST','GET'));
!
! if (!$server_id && !$this->acl_add || $server_id &&
!$this->acl_edit)
! {
! $GLOBALS['phpgw']->redirect_link('/index.php');
! }
$is = CreateObject('phpgwapi.interserver');
$GLOBALS['phpgw']->template->set_file(array('form' =>
'server_form.tpl'));
+ if (!$this->acl_delete || !$server_id)
+ {
+
$GLOBALS['phpgw']->template->set_block('form','delete','deletehandle');
+
$GLOBALS['phpgw']->template->set_var('deletehandle','');
+ }
$server = $this->bo->read($server_id);
***************
*** 254,262 ****
}
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
-
$GLOBALS['phpgw']->template->set_var('title_servers',$server_id ? lang('Edit
Peer Server') : lang('Add Peer Server'));
-
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit'));
--- 286,293 ----
}
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Admin').' - '.($server_id ? lang('Edit Peer Server') : lang('Add Peer
Server'));
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit'));
***************
*** 296,309 ****
'row_off' =>
$GLOBALS['phpgw_info']['theme']['row_off']
));
- if ($server_id)
- {
-
$GLOBALS['phpgw']->template->parse('edithandle','edit');
-
$GLOBALS['phpgw']->template->set_var('addhandle','');
- }
- else
- {
-
$GLOBALS['phpgw']->template->set_var('edithandle','');
-
$GLOBALS['phpgw']->template->parse('addhandle','add');
- }
$GLOBALS['phpgw']->template->pparse('phpgw_body','form');
}
--- 327,330 ----
***************
*** 311,314 ****
--- 332,339 ----
function delete()
{
+ if (!$this->acl_delete)
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php');
+ }
$server_id = get_var('server_id',array('POST','GET'));
if ($_POST['yes'] || $_POST['no'])
Index: hook_acl_manager.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/hook_acl_manager.inc.php,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.1.2.1
diff -C2 -r1.3.2.1 -r1.3.2.1.2.1
*** hook_acl_manager.inc.php 29 Jun 2002 15:58:37 -0000 1.3.2.1
--- hook_acl_manager.inc.php 25 May 2003 15:41:25 -0000 1.3.2.1.2.1
***************
*** 18,22 ****
'Change config settings' => 2
)
! );
$GLOBALS['acl_manager']['admin']['account_access'] = array(
--- 18,22 ----
'Change config settings' => 2
)
! ); // added and working ralfbecker
$GLOBALS['acl_manager']['admin']['account_access'] = array(
***************
*** 28,34 ****
'View account' => 8,
'Edit account' => 16,
! 'Delete account' => 32
)
! );
$GLOBALS['acl_manager']['admin']['group_access'] = array(
--- 28,35 ----
'View account' => 8,
'Edit account' => 16,
! 'Delete account' => 32,
! 'change ACL Rights' => 64
)
! ); // was already there and seems to work ralfbecker
$GLOBALS['acl_manager']['admin']['group_access'] = array(
***************
*** 42,46 ****
'Delete group' => 32
)
! );
$GLOBALS['acl_manager']['admin']['peer_server_access'] = array(
--- 43,47 ----
'Delete group' => 32
)
! ); // was already there and seems to work ralfbecker
$GLOBALS['acl_manager']['admin']['peer_server_access'] = array(
***************
*** 50,54 ****
'Search peer servers' => 2,
'Add peer server' => 4,
! 'View peer server' => 8,
'Edit peer server' => 16,
'Delete peer server' => 32
--- 51,55 ----
'Search peer servers' => 2,
'Add peer server' => 4,
! // 'View peer server' => 8, // there's no
view-routine atm.
'Edit peer server' => 16,
'Delete peer server' => 32
***************
*** 62,68 ****
'Add application' => 2,
'Edit application' => 4,
! 'Delete application' => 8
)
! );
$GLOBALS['acl_manager']['admin']['global_categories_access'] = array(
--- 63,70 ----
'Add application' => 2,
'Edit application' => 4,
! 'Delete application' => 8,
! 'Register application hooks' => 16
)
! ); // added and working ralfbecker
$GLOBALS['acl_manager']['admin']['global_categories_access'] = array(
***************
*** 74,80 ****
'View category' => 8,
'Edit category' => 16,
! 'Delete category' => 32
)
! );
$GLOBALS['acl_manager']['admin']['mainscreen_message_access'] = array(
--- 76,83 ----
'View category' => 8,
'Edit category' => 16,
! 'Delete category' => 32,
! 'Add sub-category' => 64
)
! ); // added and working ralfbecker
$GLOBALS['acl_manager']['admin']['mainscreen_message_access'] = array(
***************
*** 84,88 ****
'Login message' => 2
)
! );
$GLOBALS['acl_manager']['admin']['current_sessions_access'] = array(
--- 87,91 ----
'Login message' => 2
)
! ); // added and working ralfbecker
$GLOBALS['acl_manager']['admin']['current_sessions_access'] = array(
***************
*** 94,105 ****
'Kill session' => 8
)
! );
$GLOBALS['acl_manager']['admin']['access_log_access'] = array(
! 'name' => 'Deny access to session log',
'rights' => array(
! 'Show session log' => 1
)
! );
$GLOBALS['acl_manager']['admin']['error_log_access'] = array(
--- 97,108 ----
'Kill session' => 8
)
! ); // checked and working ralfbecker
$GLOBALS['acl_manager']['admin']['access_log_access'] = array(
! 'name' => 'Deny access to access log',
'rights' => array(
! 'Show access log' => 1
)
! ); // added and working ralfbecker
$GLOBALS['acl_manager']['admin']['error_log_access'] = array(
***************
*** 108,119 ****
'Show error log' => 1
)
! );
!
! $GLOBALS['acl_manager']['admin']['appreg_access'] = array(
! 'name' => 'Deny access to application registery',
! 'rights' => array(
! 'Register applications' => 1
! )
! );
$GLOBALS['acl_manager']['admin']['info_access'] = array(
--- 111,115 ----
'Show error log' => 1
)
! ); // added and working ralfbecker
$GLOBALS['acl_manager']['admin']['info_access'] = array(
***************
*** 122,125 ****
'Show phpinfo()' => 1
)
! );
--- 118,121 ----
'Show phpinfo()' => 1
)
! ); // added and working ralfbecker
Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/hook_admin.inc.php,v
retrieving revision 1.26.2.1.2.2
retrieving revision 1.26.2.1.2.3
diff -C2 -r1.26.2.1.2.2 -r1.26.2.1.2.3
*** hook_admin.inc.php 27 Apr 2003 21:34:14 -0000 1.26.2.1.2.2
--- hook_admin.inc.php 25 May 2003 15:41:25 -0000 1.26.2.1.2.3
***************
*** 42,46 ****
}
! if (!
$GLOBALS['phpgw']->acl->check('mainscreen_message_access',1,'admin'))
{
$file['Change Main Screen Message'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index');
--- 42,46 ----
}
! if
(!$GLOBALS['phpgw']->acl->check('mainscreen_message_access',1,'admin') ||
!$GLOBALS['phpgw']->acl->check('mainscreen_message_access',2,'admin'))
{
$file['Change Main Screen Message'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index');
***************
*** 62,66 ****
}
! if (! $GLOBALS['phpgw']->acl->check('appreg_access',1,'admin'))
{
$file['Find and Register all Application Hooks'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.register_all_hooks');
--- 62,66 ----
}
! if (! $GLOBALS['phpgw']->acl->check('applications_access',16,'admin'))
{
$file['Find and Register all Application Hooks'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.register_all_hooks');
--- hook_view_user.inc.php DELETED ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: admin/inc class.uiaccess_history.inc.php,1.6.2.2.2.3,1.6.2.2.2.4 class.uiaccounts.inc.php,1.23.2.9.2.11,1.23.2.9.2.12 class.uiaclmanager.inc.php,1.5.2.2,1.5.2.2.2.1 class.uiapplications.inc.php,1.3.2.1.2.3,1.3.2.1.2.4 class.uicategories.inc.php,1.6.2.8,1.6.2.8.2.1 class.uiconfig.inc.php,1.6.2.3.2.1,1.6.2.3.2.2 class.uicurrentsessions.inc.php,1.5.4.2,1.5.4.3 class.uilog.inc.php,1.8.4.1,1.8.4.2 class.uimainscreen.inc.php,1.1.4.1,1.1.4.2 class.uimenuclass.inc.php,1.9.2.1,1.9.2.1.2.1 class.uiserver.inc.php,1.3.2.2.2.1,1.3.2.2.2.2 hook_acl_manager.inc.php,1.3.2.1,1.3.2.1.2.1 hook_admin.inc.php,1.26.2.1.2.2,1.26.2.1.2.3 hook_view_user.inc.php,1.2,NONE,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: admin/templates/default account_form.tpl,1.22.4.2,1.22.4.3 account_form_ldap.tpl,1.15.4.2,1.15.4.3 acl_applist.tpl,1.1,1.1.4.1 acl_manager_form.tpl,1.1,1.1.4.1application_form.tpl,1.7.4.1,1.7.4.2 applications.tpl,1.5.2.1.2.1,1.5.2.1.2.2 category_form.tpl,1.7.2.1,1.7.2.1.2.1 delete_cat.tpl,1.3,1.3.6.1 listcats.tpl,1.6.2.2,1.6.2.2.2.1 listservers.tpl,1.2.4.1,1.2.4.2 mainscreen_message.tpl,1.4,1.4.4.1 server_form.tpl,1.2.4.1,1.2.4.2
- Next by Date:
[Phpgroupware-cvs] CVS: admin/setup phpgw_de.lang,1.14.2.9.2.5,1.14.2.9.2.6 phpgw_en.lang,1.23.2.18.2.6,1.23.2.18.2.7 setup.inc.php,1.9.2.4.2.1,1.9.2.4.2.2
- Previous by thread:
[Phpgroupware-cvs] CVS: admin/templates/default account_form.tpl,1.22.4.2,1.22.4.3 account_form_ldap.tpl,1.15.4.2,1.15.4.3 acl_applist.tpl,1.1,1.1.4.1 acl_manager_form.tpl,1.1,1.1.4.1application_form.tpl,1.7.4.1,1.7.4.2 applications.tpl,1.5.2.1.2.1,1.5.2.1.2.2 category_form.tpl,1.7.2.1,1.7.2.1.2.1 delete_cat.tpl,1.3,1.3.6.1 listcats.tpl,1.6.2.2,1.6.2.2.2.1 listservers.tpl,1.2.4.1,1.2.4.2 mainscreen_message.tpl,1.4,1.4.4.1 server_form.tpl,1.2.4.1,1.2.4.2
- Next by thread:
[Phpgroupware-cvs] CVS: admin/setup phpgw_de.lang,1.14.2.9.2.5,1.14.2.9.2.6 phpgw_en.lang,1.23.2.18.2.6,1.23.2.18.2.7 setup.inc.php,1.9.2.4.2.1,1.9.2.4.2.2
- Index(es):