Changeset 64 for trunk/expressoAdmin1_2/inc/class.uigroups.inc.php
- Timestamp:
- 09/05/07 11:18:58 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.uigroups.inc.php
r46 r64 14 14 var $public_functions = array 15 15 ( 16 'list_groups' 17 'add_groups' 18 'edit_groups' 19 'css' 16 'list_groups' => True, 17 'add_groups' => True, 18 'edit_groups' => True, 19 'css' => True 20 20 ); 21 21 … … 50 50 { 51 51 $account_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 52 $acl = $this->functions->read_acl($account_lid); 53 $context = $acl[0]['context']; 54 $context_display = $acl[0]['context_display']; 52 $manager_acl = $this->functions->read_acl($account_lid); 53 $raw_context = $acl['raw_context']; 54 $contexts = $manager_acl['contexts']; 55 foreach ($manager_acl['contexts_display'] as $index=>$tmp_context) 56 { 57 $context_display .= '<br>'.$tmp_context; 58 } 55 59 56 60 // Verifica se tem acesso a este modulo … … 85 89 'add_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uigroups.add_groups'), 86 90 'add_group_disabled' => $this->functions->check_acl($account_lid,'add_groups') ? '' : 'disabled', 87 'context' => $context,91 //'context' => $context, 88 92 'context_display' => $context_display, 89 93 'lang_groups_names' => lang('Groups Names'), … … 104 108 if ($GLOBALS['query'] != '') 105 109 { 106 $groups_info = $this->functions->get_list('groups', $GLOBALS['query'], $context );110 $groups_info = $this->functions->get_list('groups', $GLOBALS['query'], $contexts); 107 111 } 108 112 $total = count($groups_info); … … 144 148 if ($can_delete) 145 149 { 146 $p->set_var('delete_link',"<a href='#' onClick='javascript:delete_group(\"".$group['cn']."\",\"".$group['gidnumber']."\" ,\"".$context."\");'>Excluir</a>");150 $p->set_var('delete_link',"<a href='#' onClick='javascript:delete_group(\"".$group['cn']."\",\"".$group['gidnumber']."\");'>Excluir</a>"); 147 151 } 148 152 else … … 174 178 $GLOBALS['phpgw']->js->set_onload('get_available_sambadomains(document.forms[0].context.value, \'create_group\');'); 175 179 176 $ account_lid = $GLOBALS['phpgw']->accounts->data['account_lid'];177 $ acl = $this->functions->read_acl($account_lid);178 $manager_context = $acl[0]['context'];180 $manager_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 181 $manager_acl = $this->functions->read_acl($manager_lid); 182 $manager_contexts = $manager_acl['contexts']; 179 183 180 184 // Verifica se tem acesso a este modulo 181 if (!$this->functions->check_acl($ account_lid,'add_groups'))185 if (!$this->functions->check_acl($manager_lid,'add_groups')) 182 186 { 183 187 $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/expressoAdmin1_2/inc/access_denied.php')); … … 194 198 195 199 // Pega combo das organizações e seleciona um dos setores em caso de um erro na validaçao dos dados. 196 $combo_manager_org = $this->functions->get_organizations($manager_context, trim(strtolower($group_info['context']))); 200 //$combo_manager_org = $this->functions->get_organizations($manager_context, trim(strtolower($group_info['context']))); 201 foreach ($manager_contexts as $index=>$context) 202 $combo_manager_org .= $this->functions->get_organizations($context, trim(strtolower($group_info['context']))); 197 203 $combo_all_orgs = $this->functions->get_organizations($GLOBALS['phpgw_info']['server']['ldap_context'], trim(strtolower($group_info['context']))); 198 204 199 205 // Chama funcao para criar lista de aplicativos disponiveis. 200 $apps = $this->functions->make_list_app($ account_lid, $manager_context, '');206 $apps = $this->functions->make_list_app($manager_lid); 201 207 202 208 // Cria combo de dominio samba … … 210 216 { 211 217 // So mostra os sambaDomainName do contexto do manager 212 if ($this->ldap_functions->exist_sambadomains($manager_context , $a_sambadomain['samba_domain_name']))218 if ($this->ldap_functions->exist_sambadomains($manager_contexts, $a_sambadomain['samba_domain_name'])) 213 219 $sambadomainname_options .= "<option value='" . $a_sambadomain['samba_domain_sid'] . "'>" . $a_sambadomain['samba_domain_name'] . "</option>"; 214 220 } … … 244 250 'disabled_samba' => 'disabled', 245 251 'display_samba_options' => $this->current_config['expressoAdmin_samba_support'] == 'true' ? '' : '"display:none"', 246 'disable_email_groups' => $this->functions->check_acl($ account_lid,'edit_email_groups') ? '' : 'disabled',252 'disable_email_groups' => $this->functions->check_acl($manager_lid,'edit_email_groups') ? '' : 'disabled', 247 253 'sambadomainname_options' => $sambadomainname_options, 248 254 'back_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uigroups.list_groups'), … … 258 264 { 259 265 $GLOBALS['phpgw']->js->set_onload('get_available_users(document.forms[0].org_context.value, document.forms[0].ea_check_allUsers.checked);'); 260 261 $ account_lid = $GLOBALS['phpgw']->accounts->data['account_lid'];262 $ acl = $this->functions->read_acl($account_lid);263 $manager_context = $acl[0]['context'];264 266 267 $manager_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 268 $manager_acl = $this->functions->read_acl($manager_lid); 269 $manager_contexts = $manager_acl['contexts']; 270 265 271 // Verifica se tem acesso a este modulo 266 if (!$this->functions->check_acl($ account_lid,'edit_groups'))272 if (!$this->functions->check_acl($manager_lid,'edit_groups')) 267 273 { 268 274 $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/expressoAdmin1_2/inc/access_denied.php')); … … 270 276 271 277 // GET all infomations about the group. 272 $group_info = $this->group->get_info($_GET['gidnumber'] , $manager_context);278 $group_info = $this->group->get_info($_GET['gidnumber']); 273 279 274 280 unset($GLOBALS['phpgw_info']['flags']['noheader']); … … 282 288 283 289 // Pega combo das organizações e seleciona a org do grupo. 284 $combo_manager_org = $this->functions->get_organizations($manager_context, trim(strtolower($group_info['context']))); 290 //$combo_manager_org = $this->functions->get_organizations($manager_context, trim(strtolower($group_info['context']))); 291 foreach ($manager_contexts as $index=>$context) 292 $combo_manager_org .= $this->functions->get_organizations($context, trim(strtolower($group_info['context']))); 285 293 $combo_all_orgs = $this->functions->get_organizations($GLOBALS['phpgw_info']['server']['ldap_context'], trim(strtolower($group_info['context']))); 286 294 … … 315 323 316 324 // Chama funcao para criar lista de aplicativos disponiveis. 317 $apps = $this->functions->make_list_app($ account_lid, $manager_context, $group_info['apps']);325 $apps = $this->functions->make_list_app($manager_lid, $group_info['apps']); 318 326 319 327 // Cria combo de dominios do samba … … 352 360 'lang_all_users' => lang('Select users from all sub-organizations'), 353 361 'gidnumber' => $group_info['gidnumber'], 354 'manager_context' => $manager_context,362 //'manager_context' => $manager_context, 355 363 'cn' => $group_info['cn'], 356 364 'user_count' => $user_count, … … 360 368 'use_attrs_samba_checked' => $group_info['sambaGroup'] ? 'CHECKED' : '', 361 369 'disabled_samba' => $group_info['sambaGroup'] ? '' : 'disabled', 362 'disable_email_groups' => $this->functions->check_acl($ account_lid,'edit_email_groups') ? '' : 'disabled',370 'disable_email_groups' => $this->functions->check_acl($manager_lid,'edit_email_groups') ? '' : 'disabled', 363 371 'sambadomainname_options' => $sambadomainname_options, 364 372 'phpgwaccountvisible_checked' => $group_info['phpgwaccountvisible'] == '-1' ? 'CHECKED' : '',
Note: See TracChangeset
for help on using the changeset viewer.