Changeset 57 for trunk/expressoAdmin1_2/inc
- Timestamp:
- 08/20/07 17:12:03 (17 years ago)
- Location:
- trunk/expressoAdmin1_2/inc
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.bomanagers.inc.php
r46 r57 30 30 'lid' => $_POST['manager_lid'], 31 31 'context' => $_POST['context'], 32 32 33 'add_users' => $_POST['add_users'], 33 34 'edit_users' => $_POST['edit_users'], … … 35 36 'rename_users' => $_POST['rename_users'], 36 37 'view_users' => $_POST['view_users'], 38 'manipulate_corporative_information' => $_POST['manipulate_corporative_information'], 37 39 'add_groups' => $_POST['add_groups'], 38 40 'edit_groups' => $_POST['edit_groups'], … … 42 44 'change_users_quote' => $_POST['change_users_quote'], 43 45 'set_user_default_password' => $_POST['set_user_default_password'], 46 'empty_user_inbox' => $_POST['empty_user_inbox'], 44 47 'edit_sambausers_attributes'=> $_POST['edit_sambausers_attributes'], 45 48 'edit_sambadomains' => $_POST['edit_sambadomains'], … … 54 57 'create_computers' => $_POST['create_computers'], 55 58 'edit_computers' => $_POST['edit_computers'], 56 'delete_computers' => $_POST['delete_computers'], 59 'delete_computers' => $_POST['delete_computers'], 60 57 61 'apps' => $_POST['applications_list'] 58 62 ); … … 60 64 // Soma os niveis de acesso criando uma ACL 61 65 $acl = 0; 62 $acl = $acl + $manager['add_users'] + $manager['edit_users'] + $manager['delete_users'] + $manager['rename_users'] + $manager['view_users'] ;66 $acl = $acl + $manager['add_users'] + $manager['edit_users'] + $manager['delete_users'] + $manager['rename_users'] + $manager['view_users'] + $manager['manipulate_corporative_information']; 63 67 $acl = $acl + $manager['add_groups'] + $manager['edit_groups'] + $manager['delete_groups'] + $manager['edit_email_groups']; 64 $acl = $acl + $manager['change_users_password'] + $manager['change_users_quote'] + $manager['set_user_default_password'] ;68 $acl = $acl + $manager['change_users_password'] + $manager['change_users_quote'] + $manager['set_user_default_password'] + $manager['empty_user_inbox']; 65 69 $acl = $acl + $manager['edit_sambausers_attributes'] + $manager['edit_sambadomains']; 66 70 $acl = $acl + $manager['add_email_lists'] + $manager['edit_email_lists'] + $manager['delete_email_lists']; … … 102 106 'lid' => $_POST['manager_lid'], 103 107 'context' => $_POST['context'], 108 104 109 'add_users' => $_POST['add_users'], 105 110 'edit_users' => $_POST['edit_users'], … … 107 112 'rename_users' => $_POST['rename_users'], 108 113 'view_users' => $_POST['view_users'], 114 'manipulate_corporative_information' => $_POST['manipulate_corporative_information'], 109 115 'add_groups' => $_POST['add_groups'], 110 116 'edit_groups' => $_POST['edit_groups'], … … 114 120 'change_users_quote' => $_POST['change_users_quote'], 115 121 'set_user_default_password' => $_POST['set_user_default_password'], 122 'empty_user_inbox' => $_POST['empty_user_inbox'], 116 123 'edit_sambausers_attributes'=> $_POST['edit_sambausers_attributes'], 117 124 'edit_sambadomains' => $_POST['edit_sambadomains'], … … 127 134 'edit_computers' => $_POST['edit_computers'], 128 135 'delete_computers' => $_POST['delete_computers'], 136 129 137 'apps' => $_POST['applications_list'] 130 138 ); … … 132 140 // Soma os niveis de acesso criando uma ACL 133 141 $acl = 0; 134 $acl = $acl + $manager['add_users'] + $manager['edit_users'] + $manager['delete_users'] + $manager['rename_users'] + $manager['view_users'] ;142 $acl = $acl + $manager['add_users'] + $manager['edit_users'] + $manager['delete_users'] + $manager['rename_users'] + $manager['view_users'] + $manager['manipulate_corporative_information']; 135 143 $acl = $acl + $manager['add_groups'] + $manager['edit_groups'] + $manager['delete_groups'] + $manager['edit_email_groups']; 136 $acl = $acl + $manager['change_users_password'] + $manager['change_users_quote'] + $manager['set_user_default_password'] ;144 $acl = $acl + $manager['change_users_password'] + $manager['change_users_quote'] + $manager['set_user_default_password'] + $manager['empty_user_inbox']; 137 145 $acl = $acl + $manager['edit_sambausers_attributes'] + $manager['edit_sambadomains']; 138 146 $acl = $acl + $manager['add_email_lists'] + $manager['edit_email_lists'] + $manager['delete_email_lists']; -
trunk/expressoAdmin1_2/inc/class.functions.inc.php
r47 r57 66 66 return true; 67 67 break; 68 case manipulate_corporative_information: 69 if ($array_acl[manipulate_corporative_information]) 70 return true; 71 break; 68 72 case change_users_password: 69 73 if ($array_acl[change_users_password]) … … 76 80 case set_user_default_password: 77 81 if ($array_acl[set_user_default_password]) 82 return true; 83 break; 84 case empty_user_inbox: 85 if (($array_acl[empty_user_inbox]) && ($array_acl[edit_users])) 78 86 return true; 79 87 break; … … 186 194 187 195 // Make a array read humam 188 // Last acl: 33.554.432, 67.108.864 196 // Last acl: 33.554.432, 67.108.864, 134.217.728, 134.217.728, 268.435.456 189 197 function make_array_acl($acl) 190 198 { … … 194 202 $array_acl['rename_users'] = $acl & 8388608; 195 203 $array_acl['view_users'] = $acl & 33554432; 204 $array_acl['manipulate_corporative_information'] = $acl & 268435456; 196 205 $array_acl['add_groups'] = $acl & 16; 197 206 $array_acl['edit_groups'] = $acl & 32; … … 201 210 $array_acl['change_users_quote'] = $acl & 262144; 202 211 $array_acl['set_user_default_password'] = $acl & 524288; 212 $array_acl['empty_user_inbox'] = $acl & 134217728; 203 213 $array_acl['edit_sambausers_attributes'] = $acl & 32768; 204 214 $array_acl['edit_sambadomains'] = $acl & 16777216; -
trunk/expressoAdmin1_2/inc/class.imap_functions.inc.php
r47 r57 1 1 <?php 2 3 include_once('class.functions.inc.php'); 2 4 3 5 class imap_functions 4 6 { 7 var $functions; 5 8 var $imap; 6 9 var $imapDelimiter; … … 17 20 $this->imapDelimiter= $_SESSION['phpgw_info']['expresso']['email_server']['imapDelimiter']; 18 21 $this->imap = imap_open('{'.$this->imap_server.':'.$this->imap_port.'/novalidate-cert}', $this->imap_admin, $this->imap_passwd, OP_HALFOPEN); 22 $this->functions = new functions; 19 23 } 20 24 … … 72 76 else 73 77 { 74 $quota['mailquota'] = ($get_quota['limit'] / 1024);75 $quota['mailquota_used'] = ($get_quota['usage'] / 1024);78 $quota['mailquota'] = round (($get_quota['limit'] / 1024), 2); 79 $quota['mailquota_used'] = round (($get_quota['usage'] / 1024), 2); 76 80 } 77 81 … … 116 120 return $result; 117 121 } 122 123 function empty_inbox($params) 124 { 125 // Verifica o acesso do gerente 126 if (!$this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'empty_user_inbox')) 127 { 128 $result['status'] = false; 129 $result['msg'] = 'Você não tem acesso para executar esta operação.'; 130 return $result; 131 } 132 133 if ($_SESSION['phpgw_info']['expressomail']['email_server']['imapTLSEncryption'] == 'yes') 134 { 135 $imap_options = '/tls/novalidate-cert'; 136 } 137 else 138 { 139 $imap_options = '/notls/novalidate-cert'; 140 } 141 142 143 $result['status'] = true; 144 $uid = $params['uid']; 145 146 $return_setacl = imap_setacl($this->imap, "user" . $this->imapDelimiter . $uid, $this->imap_admin, 'lrswipcda'); 147 148 if ($return_setacl) 149 { 150 //$mbox_stream = imap_open('{'.$this->imap_server.':'.$this->imap_port.$imap_options.'/user="'.$uid.'"}', $this->imap_admin, $this->imap_passwd); 151 $mbox_stream = imap_open('{'.$this->imap_server.':'.$this->imap_port.$imap_options .'}user'. $this->imapDelimiter . $uid, $this->imap_admin, $this->imap_passwd); 152 153 $check = imap_mailboxmsginfo($mbox_stream); 154 $inbox_size = (string)(round ((($check->Size)/(1024*1024)), 2)); 155 156 $return_imap_delete = imap_delete($mbox_stream,'1:*'); 157 imap_close($mbox_stream, CL_EXPUNGE); 158 159 imap_setacl ($this->imap, "user" . $this->imapDelimiter . $uid, $this->imap_admin, ''); 160 161 if ($return_imap_delete) 162 { 163 $result['inbox_size'] = $inbox_size; 164 165 $get_user_quota = @imap_get_quotaroot($this->imap,"user" . $this->imapDelimiter . $uid); 166 $result['mailquota_used'] = (string)(round(($get_user_quota['usage']/1024), 2)); 167 } 168 else 169 { 170 $result['status'] = false; 171 $result['msg'] = "Nao foi possivel esvaziar a caixa postal do usuario:\n" . imap_last_error(); 172 } 173 } 174 else 175 { 176 $result['status'] = false; 177 $result['msg'] = "Nao foi possivel modificar a acl do usuario:\n" . imap_last_error(); 178 } 179 return $result; 180 } 118 181 } -
trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
r46 r57 3 3 define('PHPGW_API_INC','../phpgwapi/inc'); 4 4 include_once(PHPGW_API_INC.'/class.common.inc.php'); 5 include_once('class.functions.inc.php'); 5 6 6 7 class ldap_functions … … 8 9 var $ldap; 9 10 var $current_config; 11 var $functions; 10 12 11 13 function ldap_functions(){ … … 14 16 $common = new common(); 15 17 $this->ldap = $common->ldapConnect(); 18 $this->functions = new functions; 16 19 } 17 20 18 21 function validate_fields($params) 19 22 { 23 $result['status'] = true; 20 24 $params = unserialize($params['attributes']); 21 25 $type = $params['type']; … … 24 28 $mail = $params['mail']; 25 29 $mailalternateaddress = $params['mailalternateaddress']; 26 27 $result['status'] = true; 28 30 29 31 if ($_SESSION['phpgw_info']['expresso']['global_denied_users'][$uid]) 30 32 { … … 657 659 array_pop($a_tmp); 658 660 $result['sambasid'] = implode("-", $a_tmp); 661 } 662 663 // Verifica o acesso do gerente aos atributos corporativos 664 if ($this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'manipulate_corporative_information')) 665 { 666 $result['corporative_information_employeenumber']= $entry[0]['employeenumber'][0]; 667 $result['corporative_information_cpf'] = $entry[0]['cpf'][0]; 668 $result['corporative_information_rg'] = $entry[0]['rg'][0]; 669 $result['corporative_information_rguf'] = $entry[0]['rguf'][0]; 659 670 } 660 671 -
trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php
r46 r57 242 242 'display_spam_uid' => 'display:none', 243 243 'lang_general_information' => lang('General Information'), 244 'lang_corporative_information' => lang('Corporative Information'), 244 245 'lang_email_config' => lang('Email Config'), 245 246 'lang_groups_permission' => lang('Groups Permission'), … … 274 275 'ldap_context' => ldap_dn2ufn($GLOBALS['phpgw_info']['server']['ldap_context']), 275 276 277 // Corporative Information 278 'display_corporative_information' => $this->functions->check_acl($manager_lid,'manipulate_corporative_information') ? '' : 'none', 279 'lang_employeenumber' => lang('Employee number'), 280 'lang_cpf' => lang('cpf'), 281 'lang_rg' => lang('rg'), 282 'lang_rguf' => lang('rguf'), 283 276 284 //MAIL 277 285 'lang_activeemailaccount' => lang('Active email account'), … … 305 313 306 314 //SAMBA ABA 315 'display_samba_suport' => $this->functions->check_acl($manager_lid,'edit_sambausers_attributes') ? '' : 'none', 307 316 'lang_samba_config' => lang('Samba Config'), 308 317 'lang_use_attrs_samba' => lang('Use samba attributes'), … … 536 545 'display_input_account_lid' => 'display:none', 537 546 'lang_general_information' => lang('General Information'), 547 'lang_corporative_information' => lang('Corporative Information'), 538 548 'lang_email_config' => lang('Email Config'), 539 549 'lang_groups_permission' => lang('Groups Permission'), … … 572 582 'phpgwaccountvisible_checked' => $user_info['phpgwaccountvisible'] == '-1' ? 'CHECKED' : '', 573 583 574 //MAIL BORD 584 // Corporative Information 585 'display_corporative_information'=> $this->functions->check_acl($manager_account_lid,'edit_sambausers_attributes') ? '' : 'none', 586 'lang_employeenumber' => lang('Employee number'), 587 'lang_cpf' => lang('cpf'), 588 'lang_rg' => lang('rg'), 589 'lang_rguf' => lang('rguf'), 590 'corporative_information_employeenumber' => $user_info['corporative_information_employeenumber'], 591 'corporative_information_cpf' => $user_info['corporative_information_cpf'], 592 'corporative_information_rg' => $user_info['corporative_information_rg'], 593 'corporative_information_rguf' => $user_info['corporative_information_rguf'], 594 595 //MAIL 575 596 'disabled_quota_used' => 'disabled', 576 597 'lang_activeemailaccount' => lang('Active email account'), -
trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php
r46 r57 207 207 'lang_rename_user' => lang('Rename users'), 208 208 'lang_view_user' => lang('View users'), 209 'lang_manipulate_corporative_information' => lang('Manipulate corporative information'), 209 210 'lang_add_groups' => lang('Add groups'), 210 211 'lang_edit_groups' => lang('Edit groups'), … … 214 215 'lang_change_users_quote' => lang('Change users quote'), 215 216 'lang_set_user_default_password'=> lang('Set default users password'), 217 'lang_empty_user_inbox' => lang('Empty user inbox'), 216 218 'lang_edit_sambausers_attributes'=> lang('Edit SAMBA users attributes'), 217 219 'lang_edit_sambadomains' => lang('Edit SAMBA domains'), … … 233 235 'add_users' => $_POST['add_users'] != '' ? 'checked' : '', 234 236 'edit_users' => $_POST['edit_users'] != '' ? 'checked' : '', 237 'view_users' => $_POST['view_users'] != '' ? 'checked' : '', 238 'manipulate_corporative_information' => $_POST['manipulate_corporative_information'] != '' ? 'checked' : '', 235 239 'delete_users' => $_POST['delete_users'] != '' ? 'checked' : '', 236 240 'add_groups' => $_POST['add_groups'] != '' ? 'checked' : '', … … 335 339 $_POST['rename_users'] = $acl['rename_users']; 336 340 $_POST['view_users'] = $acl['view_users']; 341 $_POST['manipulate_corporative_information'] = $acl['manipulate_corporative_information']; 337 342 $_POST['add_groups'] = $acl['add_groups']; 338 343 $_POST['edit_groups'] = $acl['edit_groups']; … … 342 347 $_POST['change_users_quote'] = $acl['change_users_quote']; 343 348 $_POST['set_user_default_password'] = $acl['set_user_default_password']; 349 $_POST['empty_user_inbox'] = $acl['empty_user_inbox']; 344 350 $_POST['edit_sambausers_attributes'] = $acl['edit_sambausers_attributes']; 345 351 $_POST['edit_sambadomains'] = $acl['edit_sambadomains']; … … 453 459 'lang_rename_user' => lang('Rename users'), 454 460 'lang_view_user' => lang('View users'), 461 'lang_manipulate_corporative_information' => lang('Manipulate corporative information'), 455 462 'lang_add_groups' => lang('Add groups'), 456 463 'lang_edit_groups' => lang('Edit groups'), … … 460 467 'lang_change_users_quote' => lang('Change users quote'), 461 468 'lang_set_user_default_password'=> lang('Set default user password'), 469 'lang_empty_user_inbox' => lang('Empty user inbox'), 462 470 'lang_edit_sambausers_attributes'=> lang('Edit SAMBA users attributes'), 463 471 'lang_edit_sambadomains' => lang('Edit SAMBA domains'), … … 483 491 'rename_users' => $_POST['rename_users'] != '' ? 'checked' : '', 484 492 'view_users' => $_POST['view_users'] != '' ? 'checked' : '', 493 'manipulate_corporative_information' => $_POST['manipulate_corporative_information'] != '' ? 'checked' : '', 485 494 'add_groups' => $_POST['add_groups'] != '' ? 'checked' : '', 486 495 'edit_groups' => $_POST['edit_groups'] != '' ? 'checked' : '', … … 490 499 'change_users_quote' => $_POST['change_users_quote'] != '' ? 'checked' : '', 491 500 'set_user_default_password' => $_POST['set_user_default_password'] != '' ? 'checked' : '', 501 'empty_user_inbox' => $_POST['empty_user_inbox'] != '' ? 'checked' : '', 492 502 'edit_sambausers_attributes' => $_POST['edit_sambausers_attributes'] != '' ? 'checked' : '', 493 503 'edit_sambadomains' => $_POST['edit_sambadomains'] != '' ? 'checked' : '', -
trunk/expressoAdmin1_2/inc/class.user.inc.php
r47 r57 117 117 if (($this->current_config['expressoAdmin_samba_support'] == 'true') && ($params['use_attrs_samba'] == 'on')) 118 118 { 119 //Verifica se o binario para criar as senhas do samba exite. 120 if (!is_file('/home/expressolivre/mkntpwd')) 121 { 122 $return['status'] = false; 123 $return['msg'] .= "O arquivo binário /home/expressolivre/mkntpwd não exite.\\nEle é necessário para a criação das senhas usadas pelo SAMBA.\\nInforme o administrador ExpressoLivre sobre isto."; 124 } 125 else 126 { 127 $user_info['objectClass'][] = 'sambaSamAccount'; 128 $user_info['loginShell'] = '/bin/bash'; 129 130 $user_info['sambaSID'] = $params['sambadomain'] . '-' . ((2 * $id)+1000); 131 $user_info['sambaPrimaryGroupSID'] = $params['sambadomain'] . '-' . ((2 * $user_info['gidNumber'])+1001); 132 133 $user_info['sambaAcctFlags'] = $params['sambaacctflags']; 134 135 $user_info['sambaLogonScript'] = $params['sambalogonscript']; 136 $user_info['homeDirectory'] = $params['sambahomedirectory']; 137 138 $user_info['sambaLMPassword'] = exec('/home/expressolivre/mkntpwd -L '.$params['password1']); 139 $user_info['sambaNTPassword'] = exec('/home/expressolivre/mkntpwd -N '.$params['password1']); 140 $user_info['sambaPasswordHistory'] = '0000000000000000000000000000000000000000000000000000000000000000'; 141 142 $user_info['sambaPwdCanChange'] = strtotime("now"); 143 $user_info['sambaPwdLastSet'] = strtotime("now"); 144 $user_info['sambaPwdMustChange'] = '2147483647'; 145 } 146 } 119 // Verifica o acesso do gerente aos atributos samba 120 if ($this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'edit_sambausers_attributes')) 121 { 122 //Verifica se o binario para criar as senhas do samba exite. 123 if (!is_file('/home/expressolivre/mkntpwd')) 124 { 125 $return['status'] = false; 126 $return['msg'] .= "O arquivo binário /home/expressolivre/mkntpwd não exite.\\nEle é necessário para a criação das senhas usadas pelo SAMBA.\\nInforme o administrador ExpressoLivre sobre isto."; 127 } 128 else 129 { 130 $user_info['objectClass'][] = 'sambaSamAccount'; 131 $user_info['loginShell'] = '/bin/bash'; 132 133 $user_info['sambaSID'] = $params['sambadomain'] . '-' . ((2 * $id)+1000); 134 $user_info['sambaPrimaryGroupSID'] = $params['sambadomain'] . '-' . ((2 * $user_info['gidNumber'])+1001); 135 136 $user_info['sambaAcctFlags'] = $params['sambaacctflags']; 137 138 $user_info['sambaLogonScript'] = $params['sambalogonscript']; 139 $user_info['homeDirectory'] = $params['sambahomedirectory']; 140 141 $user_info['sambaLMPassword'] = exec('/home/expressolivre/mkntpwd -L '.$params['password1']); 142 $user_info['sambaNTPassword'] = exec('/home/expressolivre/mkntpwd -N '.$params['password1']); 143 $user_info['sambaPasswordHistory'] = '0000000000000000000000000000000000000000000000000000000000000000'; 144 145 $user_info['sambaPwdCanChange'] = strtotime("now"); 146 $user_info['sambaPwdLastSet'] = strtotime("now"); 147 $user_info['sambaPwdMustChange'] = '2147483647'; 148 } 149 } 150 } 151 152 // Verifica o acesso do gerente aos atributos corporativos 153 if ($this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'manipulate_corporative_information')) 154 { 155 foreach ($params as $atribute=>$value) 156 { 157 $pos = strrpos($atribute, 'corporative_information_'); 158 if ($pos !== false) 159 { 160 if ($params[$atribute]) 161 { 162 $ldap_atribute = str_replace("corporative_information_", "", $atribute); 163 $user_info[$ldap_atribute] = $params[$atribute]; 164 } 165 } 166 } 167 } 168 147 169 $result = $this->ldap_functions->ldap_add_entry($dn, $user_info); 148 170 if (!$result['status']) … … 239 261 $old_values = $this->get_user_info($new_values['uidnumber'], $new_values['manager_context']); 240 262 $dn = 'uid=' . $old_values['uid'] . ',' . strtolower($old_values['context']); 241 263 242 264 $diff = array_diff($new_values, $old_values); 243 265 244 266 $manager_account_lid = $_SESSION['phpgw_session']['session_lid']; 245 267 if ((!$this->functions->check_acl($manager_account_lid,'edit_users')) && … … 254 276 255 277 // Verifica o acesso do gerente 256 if (!$this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'edit_users'))257 {258 259 }260 261 // Verifica o acesso do gerente262 278 if ($this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'edit_users')) 263 279 { … … 293 309 $ldap_mod_replace['sn'] = $new_values['sn']; 294 310 $ldap_mod_replace['cn'] = $new_values['givenname'] . ' ' . $new_values['sn']; 295 $this->db_functions->write_log("altera do sn do usuario",'',$dn,'','');311 $this->db_functions->write_log("altera$ldap_mod_do sn do usuario",'',$dn,'',''); 296 312 } 297 313 if ($diff['mail']) … … 349 365 } 350 366 } 351 367 368 // REPLACE, ADD & REMOVE COPORATIVEs ATRIBUTES 369 // Verifica o acesso do gerente aos atributos corporativos 370 if ($this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'manipulate_corporative_information')) 371 { 372 foreach ($new_values as $atribute=>$value) 373 { 374 $pos = strrpos($atribute, 'corporative_information_'); 375 if ($pos !== false) 376 { 377 $ldap_atribute = str_replace("corporative_information_", "", $atribute); 378 // REPLACE ATTRS OF CORPORATIVE 379 if (($diff[$atribute]) && ($old_values[$atribute] != '')) 380 { 381 $ldap_atribute = str_replace("corporative_information_", "", $atribute); 382 $ldap_mod_replace[$ldap_atribute] = $new_values[$atribute]; 383 $this->db_functions->write_log("alterado $ldap_atribute do usuario",'',$dn,'',''); 384 } 385 //ADD ATTRS OF CORPORATIVE 386 elseif (($old_values[$atribute] == '') && ($new_values[$atribute] != '')) 387 { 388 $ldap_add[$ldap_atribute] = $new_values[$atribute]; 389 $this->db_functions->write_log("adicionado $ldap_atribute ao usuario",'',$dn,'',''); 390 } 391 //REMOVE ATTRS OF CORPORATIVE 392 elseif (($old_values[$atribute] != '') && ($new_values[$atribute] == '')) 393 { 394 $ldap_remove[$ldap_atribute] = array(); 395 $this->db_functions->write_log("removido $ldap_atribute do usuario",'',$dn,'',''); 396 } 397 } 398 } 399 } 400 352 401 //Suporte ao SAMBA 353 402 if ( ($this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'edit_users')) || … … 512 561 } 513 562 } 514 563 515 564 if ( ($this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'edit_users')) || 516 565 ($this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'edit_sambausers_attributes')) ) … … 640 689 if (count($ldap_remove)) 641 690 { 642 643 691 $result = $this->ldap_functions->remove_user_attributes($dn, $ldap_remove); 644 692 if (!$result['status']) … … 727 775 return $return; 728 776 } 729 730 777 731 778 function get_user_info($uidnumber, $context) … … 1076 1123 } 1077 1124 } 1125 1126 function write_log_from_ajax($params) 1127 { 1128 $this->db_functions->write_log($params['_action'],'',$params['userinfo'],'',''); 1129 return true; 1130 } 1078 1131 } 1079 1132 ?>
Note: See TracChangeset
for help on using the changeset viewer.