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/arap.pl
47 47
sub check_name {
48 48
  $lxdebug->enter_sub();
49 49

  
50
  $auth->assert('general_ledger         | vendor_invoice_edit       | sales_order_edit    | invoice_edit |' .
51
                'request_quotation_edit | sales_quotation_edit      | purchase_order_edit | cash');
52

  
50 53
  my ($name) = @_;
51 54

  
52 55
  $name = $name eq "customer" ? "customer" : "vendor";
......
125 128
sub select_name {
126 129
  $lxdebug->enter_sub();
127 130

  
131
  $auth->assert('general_ledger         | vendor_invoice_edit  | sales_order_edit    | invoice_edit |' .
132
                'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash');
133

  
128 134
  my ($table) = @_;
129 135

  
130 136
  @column_index = qw(ndx name address);
......
208 214

  
209 215
  # save all other form variables
210 216
  foreach $key (keys %${form}) {
217
    next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key}));
211 218
    $form->{$key} =~ s/\"/"/g;
212 219
    print qq|<input name=$key type=hidden value="$form->{$key}">\n|;
213 220
  }
......
231 238
sub name_selected {
232 239
  $lxdebug->enter_sub();
233 240

  
241
  $auth->assert('general_ledger         | vendor_invoice_edit  | sales_order_edit    | invoice_edit |' .
242
                'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash');
243

  
234 244
  # replace the variable with the one checked
235 245

  
236 246
  # index for new item
......
256 266
  $lxdebug->leave_sub();
257 267
}
258 268

  
259
sub add_transaction {
260
  $lxdebug->enter_sub();
261

  
262
  my ($module) = @_;
263

  
264
  delete $form->{script};
265
  $form->{action} = "add";
266
  $form->{type}   = "invoice" if $module =~ /(is|ir)/;
267

  
268
  $form->{callback} = $form->escape($form->{callback}, 1);
269
  map { $argv .= "$_=$form->{$_}&" } keys %$form;
270

  
271
  $form->{callback} = "$module.pl?$argv";
272

  
273
  $form->redirect;
274

  
275
  $lxdebug->leave_sub();
276
}
277

  
278 269
sub check_project {
279 270
  $lxdebug->enter_sub();
280 271

  
272
  $auth->assert('general_ledger         | vendor_invoice_edit  | sales_order_edit    | invoice_edit |' .
273
                'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash         | report');
274

  
281 275
  for $i (1 .. $form->{rowcount}) {
282 276
    my $suffix = $i ? "_$i" : "";
283 277
    my $prefix = $i ? "" : "global";
......
296 290
        }
297 291

  
298 292
        if ($rows == 1) {
299
          $form->{"${prefix}project_id${suffix}"} =
300
            $form->{project_list}->[0]->{id};
301
          $form->{"${prefix}projectnumber${suffix}"} =
302
            $form->{project_list}->[0]->{projectnumber};
303
          $form->{"old${prefix}projectnumber${suffix}"} =
304
            $form->{project_list}->[0]->{projectnumber};
293
          $form->{"${prefix}project_id${suffix}"}       = $form->{project_list}->[0]->{id};
294
          $form->{"${prefix}projectnumber${suffix}"}    = $form->{project_list}->[0]->{projectnumber};
295
          $form->{"old${prefix}projectnumber${suffix}"} = $form->{project_list}->[0]->{projectnumber};
305 296
        } else {
306 297

  
307 298
          # not on file
......
319 310
sub select_project {
320 311
  $lxdebug->enter_sub();
321 312

  
313
  $auth->assert('general_ledger         | vendor_invoice_edit  | sales_order_edit    | invoice_edit |' .
314
                'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash         | report');
315

  
322 316
  my ($is_global) = @_;
323 317

  
324 318
  @column_index = qw(ndx projectnumber description);
......
402 396

  
403 397
  # save all other form variables
404 398
  foreach $key (keys %${form}) {
399
    next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key}));
405 400
    $form->{$key} =~ s/\"/&quot;/g;
406 401
    print qq|<input name=$key type=hidden value="$form->{$key}">\n|;
407 402
  }
......
425 420
sub project_selected {
426 421
  $lxdebug->enter_sub();
427 422

  
423
  $auth->assert('general_ledger         | vendor_invoice_edit  | sales_order_edit    | invoice_edit |' .
424
                'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash         | report');
425

  
428 426
  # replace the variable with the one checked
429 427

  
430 428
  # index for new item
......
456 454
}
457 455

  
458 456
sub continue       { call_sub($form->{"nextsub"}); }
459
sub gl_transaction { &add }
460
sub ar_transaction { &add_transaction('ar') }
461
sub ap_transaction { &add_transaction('ap') }
462
sub sales_invoice  { &add_transaction('is') }
463
sub vendor_invoice { &add_transaction('ir') }
464 457

  

Auch abrufbar als: Unified diff