source: trunk/workflow/inc/class.ui_adminaccess.inc.php @ 795

Revision 795, 3.2 KB checked in by viani, 15 years ago (diff)

Ticket #488 - Inclusão do módulo workflow no ramo trunk do repositório Expresso.

  • Property svn:executable set to *
Line 
1<?php
2/**************************************************************************\
3* eGroupWare                                                 *
4* http://www.egroupware.org                                                *
5* --------------------------------------------                             *
6*  This program is free software; you can redistribute it and/or modify it *
7*  under the terms of the GNU General Public License as published by the   *
8*  Free Software Foundation; either version 2 of the License, or (at your  *
9*  option) any later version.                                              *
10\**************************************************************************/
11
12require_once(dirname(__FILE__) . SEP . 'class.ui_ajaxinterface.inc.php');
13
14/**
15* Monta a interface inicial da Lista de Controle de Acesso
16*
17* @package Workflow
18* @author Rodrigo Daniel C de Lira - rodrigo.lira@gmail.com
19* @author Sidnei Augusto Drovetto Jr. - drovetto@gmail.com
20* @license http://www.gnu.org/copyleft/gpl.html GPL
21*/
22class ui_adminaccess extends ui_ajaxinterface
23{
24        /**
25        * Relaciona os métodos públicos da classe
26        *
27        * @var array $public_functions
28        * @access private
29        */
30        var $public_functions = array(
31                'form'  => true,
32        );
33
34        /**
35        * Verifica permissão do usuário atual para rodar a lista de controle de acesso
36        * Caso não tenha permissão, emite mensagem e encerra execução
37        *
38        * @return void
39        * @access public
40        */
41        function ui_adminaccess()
42        {
43                if (!$GLOBALS['workflow']['factory']->getInstance('workflow_acl')->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']))
44                {
45                        $GLOBALS['phpgw']->common->phpgw_header();
46                        echo parse_navbar();
47                        echo lang('access not permitted');
48                        $GLOBALS['phpgw']->log->message('F-Abort, Unauthorized access to workflow.ui_adminprocesses');
49                        $GLOBALS['phpgw']->log->commit();
50                        $GLOBALS['phpgw']->common->phpgw_exit();
51                }
52        }
53
54        /**
55        * Monta a página inicial da interface de controle de acesso, a partir do template, e
56        * executa o método inicial JavaScript para preencher dadas
57        *
58        * @return void
59        * @access public
60        */
61        function form()
62        {
63                $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title'] . ' - ' . lang('Access Control List');
64                $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow');
65                $smarty = CreateObject('workflow.workflow_smarty');
66
67                $javaScripts = $this->get_common_js();
68                $javaScripts .= $this->get_js_link('workflow','jscode', 'prototype');
69                $javaScripts .= $this->get_js_link('workflow','adminaccess', 'main');
70                $javaScripts .= $this->get_js_link('workflow','adminaccess', 'control_folder');
71                $javaScripts .= $this->get_js_link('workflow','jscode', 'participants');
72
73                $css = $this->get_common_css();
74
75                $tabs = array(
76                        'Administração',
77                        'Desenvolvimento',
78                        'Organograma',
79                        'Processos',
80                        'Monitoramento',
81                        'Aplicações Externas'
82                );
83
84                $smarty->assign('header', $smarty->expressoHeader);
85                $smarty->assign('footer', $smarty->expressoFooter);
86                $smarty->assign('txt_loading', lang("loading"));
87                $smarty->assign('javaScripts', $javaScripts);
88                $smarty->assign('css', $css);
89                $smarty->assign('tabs', $tabs);
90                $smarty->display('adminaccess.tpl');
91        }
92}
93?>
Note: See TracBrowser for help on using the repository browser.