Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8c7e4493

Von Moritz Bunkus vor fast 17 Jahren hinzugefügt

  • ID 8c7e44938a661e035f62840e1e177353240ace5d
  • Vorgänger 3ced230b
  • Nachfolger ce45d060

Umstellung der Benutzerverwaltung von Dateien im Verzeichnis "users" auf die Verwendung einer Authentifizierungsdatenbank.
Es ist erforderlich, die Dateien doc/UPGRADE und doc/INSTALL/index.html zu lesen und die angesprochenen Punkte auszuführen, um nach einem Upgrade weiter arbeiten zu können.

Unterschiede anzeigen:

bin/mozilla/ct.pl
54 54
sub add {
55 55
  $lxdebug->enter_sub();
56 56

  
57
  $auth->assert('customer_vendor_edit');
58

  
57 59
  $form->{title} = "Add";
58 60

  
59 61
  $form->{callback} =
60
    "$form->{script}?action=add&db=$form->{db}&login=$form->{login}&password=$form->{password}"
62
    "$form->{script}?action=add&db=$form->{db}"
61 63
    unless $form->{callback};
62 64

  
63 65
  CT->populate_drop_down_boxes(\%myconfig, \%$form);
......
71 73
sub search {
72 74
  $lxdebug->enter_sub();
73 75

  
76
  $auth->assert('customer_vendor_edit');
77

  
74 78
  $form->{IS_CUSTOMER} = $form->{db} eq 'customer';
75 79

  
76 80
  $form->get_lists("business_types" => "ALL_BUSINESS_TYPES");
......
88 92
sub list_names {
89 93
  $lxdebug->enter_sub();
90 94

  
95
  $auth->assert('customer_vendor_edit');
96

  
91 97
  $form->{IS_CUSTOMER} = $form->{db} eq 'customer';
92 98

  
93 99
  CT->search(\%myconfig, \%$form);
......
208 214
sub edit {
209 215
  $lxdebug->enter_sub();
210 216

  
217
  $auth->assert('customer_vendor_edit');
218

  
211 219
  # show history button
212 220
  $form->{javascript} = qq|<script type=text/javascript src=js/show_history.js></script>|;
213 221
  #/show hhistory button
......
235 243
sub form_header {
236 244
  $lxdebug->enter_sub();
237 245

  
246
  $auth->assert('customer_vendor_edit');
247

  
238 248
  $form->get_lists("employees" => "ALL_SALESMEN",
239 249
                   "taxzones"  => "ALL_TAXZONES");
240 250
  $form->get_pricegroup(\%myconfig, { all => 1 });
......
252 262
  unshift @{ $form->{CONTACTS} }, +{ cp_id     => '0', cp_name => $locale->text('New contact') };
253 263

  
254 264
  push @{ $form->{AJAX} }, map { 
255
    new CGI::Ajax( "get_$_" => "$form->{script}?login=$form->{login}&password=$form->{password}&action=get_$_" ) 
265
    new CGI::Ajax( "get_$_" => "$form->{script}?action=get_$_" ) 
256 266
  } qw(shipto contact delivery);
257 267

  
258 268
  $form->{title} = $form->{title_save} 
......
272 282
sub form_footer {
273 283
  $lxdebug->enter_sub();
274 284

  
285
  $auth->assert('customer_vendor_edit');
286

  
275 287
  print $form->parse_html_template('ct/form_footer', { is_orphaned => $form->{status} eq 'orphaned',
276 288
                                                       is_customer => $form->{db}     eq 'customer' });
277 289
  $lxdebug->leave_sub();
......
280 292
sub add_transaction {
281 293
  $lxdebug->enter_sub();
282 294

  
295
  $auth->assert('customer_vendor_edit & general_ledger');
296

  
283 297
#  # saving the history
284 298
#  if(!exists $form->{addition}) {
285 299
#  	$form->{addition} = "ADD TRANSACTION";
......
298 312
  $name = $form->escape("$form->{name}", 1);
299 313

  
300 314
  $form->{callback} =
301
    "$form->{script}?login=$form->{login}&password=$form->{password}&action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&callback=$form->{callback}";
315
    "$form->{script}?action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&callback=$form->{callback}";
302 316
  $form->redirect;
303 317

  
304 318
  $lxdebug->leave_sub();
......
307 321
sub save_and_ap_transaction {
308 322
  $lxdebug->enter_sub();
309 323

  
324
  $auth->assert('customer_vendor_edit & general_ledger');
325

  
310 326
  $form->{script} = "ap.pl";
311 327
  # saving the history
312 328
  if(!exists $form->{addition}) {
......
322 338
sub save_and_ar_transaction {
323 339
  $lxdebug->enter_sub();
324 340

  
341
  $auth->assert('customer_vendor_edit & general_ledger');
342

  
325 343
  $form->{script} = "ar.pl";
326 344
  # saving the history
327 345
  if(!exists $form->{addition}) {
......
337 355
sub save_and_invoice {
338 356
  $lxdebug->enter_sub();
339 357

  
358
  if ($form->{db} eq 'customer') {
359
    $auth->assert('customer_vendor_edit & invoice_edit');
360
  } else {
361
    $auth->assert('customer_vendor_edit & vendor_invoice_edit');
362
  }
363

  
340 364
  $form->{script} = ($form->{db} eq 'customer') ? "is.pl" : "ir.pl";
341 365
  $form->{type} = "invoice";
342 366
  # saving the history
......
353 377
sub save_and_rfq {
354 378
  $lxdebug->enter_sub();
355 379

  
380
  $auth->assert('customer_vendor_edit & request_quotation_edit');
381

  
356 382
  $form->{script} = "oe.pl";
357 383
  $form->{type}   = "request_quotation";
358 384
  # saving the history
......
369 395
sub save_and_quotation {
370 396
  $lxdebug->enter_sub();
371 397

  
398
  $auth->assert('customer_vendor_edit & sales_quotation_edit');
399

  
372 400
  $form->{script} = "oe.pl";
373 401
  $form->{type}   = "sales_quotation";
374 402
  # saving the history
......
385 413
sub save_and_order {
386 414
  $lxdebug->enter_sub();
387 415

  
416
  $auth->assert('customer_vendor_edit & sales_order_edit');
417

  
388 418
  $form->{script} = "oe.pl";
389 419
  $form->{type}   =
390 420
    ($form->{db} eq 'customer') ? "sales_order" : "purchase_order";
......
402 432
sub save_and_close {
403 433
  $lxdebug->enter_sub();
404 434

  
435
  $auth->assert('customer_vendor_edit');
436

  
405 437
  # $locale->text('Customer saved!')
406 438
  # $locale->text('Vendor saved!')
407 439

  
......
432 464
sub save {
433 465
  $lxdebug->enter_sub();
434 466

  
467
  $auth->assert('customer_vendor_edit');
468

  
435 469
  # $locale->text('Customer saved!')
436 470
  # $locale->text('Vendor saved!')
437 471

  
......
469 503
sub delete {
470 504
  $lxdebug->enter_sub();
471 505

  
506
  $auth->assert('customer_vendor_edit');
507

  
472 508
  # $locale->text('Customer deleted!')
473 509
  # $locale->text('Cannot delete customer!')
474 510
  # $locale->text('Vendor deleted!')
......
496 532
sub display {
497 533
  $lxdebug->enter_sub();
498 534

  
535
  $auth->assert('customer_vendor_edit');
536

  
499 537
  &form_header();
500 538
  &form_footer();
501 539

  
......
505 543
sub update {
506 544
  $lxdebug->enter_sub();
507 545

  
546
  $auth->assert('customer_vendor_edit');
547

  
508 548
  &display();
509 549
  $lxdebug->leave_sub();
510 550
}
......
512 552
sub get_contact {
513 553
  $lxdebug->enter_sub();
514 554

  
555
  $auth->assert('customer_vendor_edit');
556

  
515 557
  CT->get_contact(\%myconfig, \%$form);
516 558

  
517 559
  my $q = new CGI;
......
526 568
sub get_shipto {
527 569
  $lxdebug->enter_sub();
528 570

  
571
  $auth->assert('customer_vendor_edit');
572

  
529 573
  CT->get_shipto(\%myconfig, \%$form);
530 574

  
531 575
  my $q = new CGI;
......
540 584
sub get_delivery {
541 585
  $lxdebug->enter_sub();
542 586

  
587
  $auth->assert('customer_vendor_edit');
588

  
543 589
  CT->get_delivery(\%myconfig, \%$form );
544 590

  
545 591
  print CGI->new->header();

Auch abrufbar als: Unified diff