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/ar.pl
84 84
sub add {
85 85
  $lxdebug->enter_sub();
86 86

  
87
  $auth->assert('general_ledger');
88

  
87 89
  return $lxdebug->leave_sub() if (load_draft_maybe());
88 90

  
89 91
  # saving the history
......
95 97
  # /saving the history 
96 98
  
97 99
  $form->{title}    = "Add";
98
  $form->{callback} =
99
    "$form->{script}?action=add&login=$form->{login}&password=$form->{password}"
100
    unless $form->{callback};
100
  $form->{callback} = "ar.pl?action=add" unless $form->{callback};
101 101

  
102 102
  AR->get_transdate(\%myconfig, $form);
103 103
  $form->{initial_transdate} = $form->{transdate};
......
109 109

  
110 110
sub edit {
111 111
  $lxdebug->enter_sub();
112

  
113
  $auth->assert('general_ledger');
114

  
112 115
  # show history button
113 116
  $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
114 117
  #/show hhistory button
......
124 127
sub display_form {
125 128
  $lxdebug->enter_sub();
126 129

  
130
  $auth->assert('general_ledger');
131

  
127 132
  &form_header;
128 133
  &form_footer;
129 134

  
......
133 138
sub create_links {
134 139
  $lxdebug->enter_sub();
135 140

  
141
  $auth->assert('general_ledger');
142

  
136 143
  my ($duedate, $taxincluded, @curr);
137 144

  
138 145
  $form->create_links("AR", \%myconfig, "customer");
......
200 207
sub form_header {
201 208
  $lxdebug->enter_sub();
202 209

  
210
  $auth->assert('general_ledger');
211

  
203 212
  my ($title, $readonly, $exchangerate, $rows);
204 213
  my ($taxincluded, $notes, $department, $customer, $employee, $amount, $project);
205 214
  my ($jsscript, $button1, $button2, $onload);
......
787 796
sub form_footer {
788 797
  $lxdebug->enter_sub();
789 798

  
799
  $auth->assert('general_ledger');
800

  
790 801
  my ($transdate, $closedto);
791 802

  
792 803
  print qq|
......
794 805
<input name=gldate type=hidden value="| . Q($form->{gldate}) . qq|">
795 806

  
796 807
<input name=callback type=hidden value="$form->{callback}">
797

  
798
<input type=hidden name=login value=$form->{login}>
799
<input type=hidden name=password value=$form->{password}>
800 808
|
801 809
. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
802 810
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}])
......
871 879

  
872 880
sub mark_as_paid {
873 881
  $lxdebug->enter_sub();
882

  
883
  $auth->assert('general_ledger');
884

  
874 885
  &mark_as_paid_common(\%myconfig,"ar");  
886

  
875 887
  $lxdebug->leave_sub();
876 888
}
877 889

  
878 890
sub update {
879 891
  $lxdebug->enter_sub();
880 892

  
893
  $auth->assert('general_ledger');
894

  
881 895
  my $display = shift;
882 896

  
883 897
  my ($totaltax, $exchangerate, $totalpaid);
......
973 987
sub post_payment {
974 988
  $lxdebug->enter_sub();
975 989

  
990
  $auth->assert('general_ledger');
991

  
976 992
  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
977 993

  
978 994
  for my $i (1 .. $form->{paidaccounts}) {
......
1000 1016
}
1001 1017

  
1002 1018
sub _post {
1019

  
1020
  $auth->assert('general_ledger');
1021

  
1003 1022
  # inline post
1004 1023
  post(1);
1005 1024
}
......
1007 1026
sub post {
1008 1027
  $lxdebug->enter_sub();
1009 1028

  
1029
  $auth->assert('general_ledger');
1030

  
1010 1031
  my ($inline) = @_;
1011 1032

  
1012 1033
  my ($datepaid);
......
1075 1096
sub post_as_new {
1076 1097
  $lxdebug->enter_sub();
1077 1098

  
1099
  $auth->assert('general_ledger');
1100

  
1078 1101
  $form->{postasnew} = 1;
1079 1102
  # saving the history
1080 1103
  if(!exists $form->{addition} && $form->{id} ne "") {
......
1091 1114
sub use_as_template {
1092 1115
  $lxdebug->enter_sub();
1093 1116

  
1117
  $auth->assert('general_ledger');
1118

  
1094 1119
  map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno);
1095 1120
  $form->{paidaccounts} = 1;
1096 1121
  $form->{rowcount}--;
......
1103 1128
sub delete {
1104 1129
  $lxdebug->enter_sub();
1105 1130

  
1131
  $auth->assert('general_ledger');
1132

  
1106 1133
  $form->{title} = $locale->text('Confirm!');
1107 1134

  
1108 1135
  $form->header;
......
1116 1143
|;
1117 1144

  
1118 1145
  foreach my $key (keys %$form) {
1146
    next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key}));
1119 1147
    $form->{$key} =~ s/\"/&quot;/g;
1120 1148
    print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
1121 1149
  }
......
1140 1168

  
1141 1169
sub yes {
1142 1170
  $lxdebug->enter_sub();
1171

  
1172
  $auth->assert('general_ledger');
1173

  
1143 1174
  if (AR->delete_transaction(\%myconfig, \%$form)) {
1144 1175
    # saving the history
1145 1176
    if(!exists $form->{addition}) {
......
1158 1189
sub search {
1159 1190
  $lxdebug->enter_sub();
1160 1191

  
1192
  $auth->assert('general_ledger | invoice_edit');
1193

  
1161 1194
  my ($customer, $department);
1162 1195
  my ($jsscript, $button1, $button2, $onload);
1163 1196

  
......
1367 1400

  
1368 1401
<input type=hidden name=nextsub value=$form->{nextsub}>
1369 1402

  
1370
<input type=hidden name=login value=$form->{login}>
1371
<input type=hidden name=password value=$form->{password}>
1372

  
1373 1403
<br>
1374 1404
<input class=submit type=submit name=action value="|
1375 1405
    . $locale->text('Continue') . qq|">
......
1407 1437
sub ar_transactions {
1408 1438
  $lxdebug->enter_sub();
1409 1439

  
1440
  $auth->assert('general_ledger | invoice_edit');
1441

  
1410 1442
  my ($callback, $href, @columns);
1411 1443

  
1412 1444
  $form->{customer} = $form->unescape($form->{customer});
......
1583 1615
sub storno {
1584 1616
  $lxdebug->enter_sub();
1585 1617

  
1618
  $auth->assert('general_ledger');
1619

  
1586 1620
  # don't cancel cancelled transactions
1587 1621
  if (IS->has_storno(\%myconfig, $form, 'ar')) {
1588 1622
    $form->{title} = $locale->text("Cancel Accounts Receivables Transaction");

Auch abrufbar als: Unified diff