Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e0f5deea

Von Martin Helmling martin.helmling@octosoft.eu vor etwa 8 Jahren hinzugefügt

  • ID e0f5deeae4cdcf3faf3bc68a202f20ec6cd9af2e
  • Vorgänger 3b263d51
  • Nachfolger 8619c4dd

Verteilen der Rechte für Finanzbuchhaltung auf Dialogbuchung,Kreditoren-/Debitorenrechnungen

Es werden drei neue Rechte eingeführt, die den Zugriff auf Dialogbuchungen,Kreditoren-/Debitorenrechnungen verfeinern

Das Recht für Finanzbuchhaltung wird auf diese Rechte als default kopiert

Unterschiede anzeigen:

SL/Auth.pm
936 936
  my ($self) = @_;
937 937

  
938 938
  @{ $self->{master_rights} ||= do {
939
      $self->dbconnect->selectall_arrayref("SELECT name, description, category FROM auth.master_rights ORDER BY id");
939
      $self->dbconnect->selectall_arrayref("SELECT name, description, category FROM auth.master_rights ORDER BY position");
940 940
    }
941 941
  }
942 942
}
SL/Controller/CustomerVendor.pm
263 263
sub _transaction {
264 264
  my ($self, $script) = @_;
265 265

  
266
  $::auth->assert('general_ledger         | invoice_edit         | vendor_invoice_edit | ' .
266
  $::auth->assert('gl_transactions | ap_transactions | ar_transactions'.
267
                    '| invoice_edit         | vendor_invoice_edit | ' .
267 268
                 ' request_quotation_edit | sales_quotation_edit | sales_order_edit    | purchase_order_edit');
268 269

  
269 270
  $self->_save();
......
287 288
sub action_save_and_ar_transaction {
288 289
  my ($self) = @_;
289 290

  
290
  $main::auth->assert('general_ledger');
291
  $main::auth->assert('ar_transactions');
291 292

  
292 293
  $self->_transaction('ar.pl');
293 294
}
......
295 296
sub action_save_and_ap_transaction {
296 297
  my ($self) = @_;
297 298

  
298
  $main::auth->assert('general_ledger');
299
  $main::auth->assert('ap_transactions');
299 300

  
300 301
  $self->_transaction('ap.pl');
301 302
}
SL/Controller/Draft.pm
164 164
}
165 165

  
166 166
sub check_auth {
167
  $::auth->assert('vendor_invoice_edit | invoice_edit | general_ledger');
167
  $::auth->assert('vendor_invoice_edit | invoice_edit | ap_transactions | ar_transactions');
168 168
}
169 169

  
170 170
1;
bin/mozilla/ar.pl
81 81
sub add {
82 82
  $main::lxdebug->enter_sub();
83 83

  
84
  $main::auth->assert('general_ledger');
84
  $main::auth->assert('ar_transactions');
85 85

  
86 86
  my $form     = $main::form;
87 87
  my %myconfig = %main::myconfig;
......
108 108
sub edit {
109 109
  $main::lxdebug->enter_sub();
110 110

  
111
  $main::auth->assert('general_ledger');
111
  $main::auth->assert('ar_transactions');
112 112

  
113 113
  my $form     = $main::form;
114 114

  
......
127 127
sub display_form {
128 128
  $main::lxdebug->enter_sub();
129 129

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

  
132 132
  my $form     = $main::form;
133 133

  
......
146 146
sub create_links {
147 147
  $main::lxdebug->enter_sub();
148 148

  
149
  $main::auth->assert('general_ledger');
149
  $main::auth->assert('ar_transactions');
150 150

  
151 151
  my %params   = @_;
152 152
  my $form     = $main::form;
......
216 216
sub form_header {
217 217
  $main::lxdebug->enter_sub();
218 218

  
219
  $main::auth->assert('general_ledger');
219
  $main::auth->assert('ar_transactions');
220 220

  
221 221
  my $form     = $main::form;
222 222
  my %myconfig = %main::myconfig;
......
476 476
sub form_footer {
477 477
  $main::lxdebug->enter_sub();
478 478

  
479
  $main::auth->assert('general_ledger');
479
  $main::auth->assert('ar_transactions');
480 480

  
481 481
  my $form     = $main::form;
482 482
  my %myconfig = %main::myconfig;
......
513 513
sub mark_as_paid {
514 514
  $main::lxdebug->enter_sub();
515 515

  
516
  $main::auth->assert('general_ledger');
516
  $main::auth->assert('ar_transactions');
517 517

  
518 518
  my $form     = $main::form;
519 519
  my %myconfig = %main::myconfig;
......
526 526
sub update {
527 527
  $main::lxdebug->enter_sub();
528 528

  
529
  $main::auth->assert('general_ledger');
529
  $main::auth->assert('ar_transactions');
530 530

  
531 531
  my $form     = $main::form;
532 532
  my %myconfig = %main::myconfig;
......
616 616
sub post_payment {
617 617
  $main::lxdebug->enter_sub();
618 618

  
619
  $main::auth->assert('general_ledger');
619
  $main::auth->assert('ar_transactions');
620 620

  
621 621
  my $form     = $main::form;
622 622
  my %myconfig = %main::myconfig;
......
666 666

  
667 667
sub _post {
668 668

  
669
  $main::auth->assert('general_ledger');
669
  $main::auth->assert('ar_transactions');
670 670

  
671 671
  my $form     = $main::form;
672 672

  
......
677 677
sub post {
678 678
  $main::lxdebug->enter_sub();
679 679

  
680
  $main::auth->assert('general_ledger');
680
  $main::auth->assert('ar_transactions');
681 681

  
682 682
  my $form     = $main::form;
683 683
  my %myconfig = %main::myconfig;
......
767 767
sub post_as_new {
768 768
  $main::lxdebug->enter_sub();
769 769

  
770
  $main::auth->assert('general_ledger');
770
  $main::auth->assert('ar_transactions');
771 771

  
772 772
  my $form     = $main::form;
773 773
  my %myconfig = %main::myconfig;
......
789 789
sub use_as_new {
790 790
  $main::lxdebug->enter_sub();
791 791

  
792
  $main::auth->assert('general_ledger');
792
  $main::auth->assert('ar_transactions');
793 793

  
794 794
  my $form     = $main::form;
795 795
  my %myconfig = %main::myconfig;
......
806 806
sub delete {
807 807
  $main::lxdebug->enter_sub();
808 808

  
809
  $main::auth->assert('general_ledger');
809
  $main::auth->assert('ar_transactions');
810 810

  
811 811
  my $form     = $main::form;
812 812
  my $locale   = $main::locale;
......
845 845
sub yes {
846 846
  $main::lxdebug->enter_sub();
847 847

  
848
  $main::auth->assert('general_ledger');
848
  $main::auth->assert('ar_transactions');
849 849

  
850 850
  my $form     = $main::form;
851 851
  my %myconfig = %main::myconfig;
......
1187 1187
sub storno {
1188 1188
  $main::lxdebug->enter_sub();
1189 1189

  
1190
  $main::auth->assert('general_ledger');
1190
  $main::auth->assert('ar_transactions');
1191 1191

  
1192 1192
  my $form     = $main::form;
1193 1193
  my %myconfig = %main::myconfig;
bin/mozilla/arap.pl
53 53
  my %myconfig = %main::myconfig;
54 54
  my $locale   = $main::locale;
55 55

  
56
  $main::auth->assert('general_ledger               | vendor_invoice_edit       | sales_order_edit    | invoice_edit |' .
56
  $main::auth->assert('ar_transactions | ap_transactions | vendor_invoice_edit       | sales_order_edit    | invoice_edit |' .
57 57
                'request_quotation_edit       | sales_quotation_edit      | purchase_order_edit | cash         |' .
58 58
                'purchase_delivery_order_edit | sales_delivery_order_edit');
59 59

  
......
152 152
  my $form     = $main::form;
153 153
  my $locale   = $main::locale;
154 154

  
155
  $main::auth->assert('general_ledger         | vendor_invoice_edit  | sales_order_edit    | invoice_edit | sales_delivery_order_edit |' .
155
  $main::auth->assert('ar_transactions| ap_transactions | vendor_invoice_edit  | sales_order_edit    | invoice_edit | sales_delivery_order_edit |' .
156 156
                'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash');
157 157

  
158 158
  my ($table) = @_;
......
260 260
  my $form     = $main::form;
261 261
  my %myconfig = %main::myconfig;
262 262

  
263
  $main::auth->assert('general_ledger         | vendor_invoice_edit  | sales_order_edit    | invoice_edit | sales_delivery_order_edit | ' .
263
  $main::auth->assert('ar_transactions | ap_transactions | vendor_invoice_edit  | sales_order_edit    | invoice_edit | sales_delivery_order_edit | ' .
264 264
                'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash');
265 265

  
266 266
  # replace the variable with the one checked
......
302 302
sub select_project {
303 303
  $::lxdebug->enter_sub;
304 304

  
305
  $::auth->assert('general_ledger         | vendor_invoice_edit  | sales_order_edit    | invoice_edit |' .
305
  $::auth->assert('ar_transactions | ap_transactions | vendor_invoice_edit  | sales_order_edit    | invoice_edit |' .
306 306
                  'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash         | report');
307 307

  
308 308
  my ($is_global, $nextsub) = @_;
......
329 329

  
330 330
  my $form     = $main::form;
331 331

  
332
  $main::auth->assert('general_ledger         | vendor_invoice_edit  | sales_order_edit    | invoice_edit |' .
332
  $main::auth->assert('ar_transactions  | ap_transactions    | vendor_invoice_edit  | sales_order_edit    | invoice_edit |' .
333 333
                'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash         | report');
334 334

  
335 335
  # replace the variable with the one checked
bin/mozilla/gl.pl
78 78
sub add {
79 79
  $main::lxdebug->enter_sub();
80 80

  
81
  $main::auth->assert('general_ledger');
81
  $main::auth->assert('gl_transactions');
82 82

  
83 83
  my $form     = $main::form;
84 84
  my %myconfig = %main::myconfig;
......
118 118
sub prepare_transaction {
119 119
  $main::lxdebug->enter_sub();
120 120

  
121
  $main::auth->assert('general_ledger');
121
  $main::auth->assert('gl_transactions');
122 122

  
123 123
  my $form     = $main::form;
124 124
  my %myconfig = %main::myconfig;
......
189 189
sub edit {
190 190
  $main::lxdebug->enter_sub();
191 191

  
192
  $main::auth->assert('general_ledger');
192
  $main::auth->assert('gl_transactions');
193 193

  
194 194
  my $form     = $main::form;
195 195
  my %myconfig = %main::myconfig;
......
210 210

  
211 211
sub search {
212 212
  $::lxdebug->enter_sub;
213
  $::auth->assert('general_ledger');
213
  $::auth->assert('gl_transactions');
214 214

  
215 215
  $::form->all_departments(\%::myconfig);
216 216
  $::form->get_lists(
......
249 249
sub generate_report {
250 250
  $main::lxdebug->enter_sub();
251 251

  
252
  $main::auth->assert('general_ledger');
252
  $main::auth->assert('gl_transactions');
253 253

  
254 254
  my $form     = $main::form;
255 255
  my %myconfig = %main::myconfig;
......
513 513
sub update {
514 514
  $main::lxdebug->enter_sub();
515 515

  
516
  $main::auth->assert('general_ledger');
516
  $main::auth->assert('gl_transactions');
517 517

  
518 518
  my $form     = $main::form;
519 519
  my %myconfig = %main::myconfig;
......
621 621
  my ($init) = @_;
622 622
  $main::lxdebug->enter_sub();
623 623

  
624
  $main::auth->assert('general_ledger');
624
  $main::auth->assert('gl_transactions');
625 625

  
626 626
  my $form     = $main::form;
627 627
  my %myconfig = %main::myconfig;
......
644 644
  my ($init) = @_;
645 645
  $main::lxdebug->enter_sub();
646 646

  
647
  $main::auth->assert('general_ledger');
647
  $main::auth->assert('gl_transactions');
648 648

  
649 649
  my $form     = $main::form;
650 650
  my %myconfig = %main::myconfig;
......
848 848

  
849 849
sub form_header {
850 850
  $::lxdebug->enter_sub;
851
  $::auth->assert('general_ledger');
851
  $::auth->assert('gl_transactions');
852 852

  
853 853
  my ($init) = @_;
854 854

  
......
896 896

  
897 897
sub form_footer {
898 898
  $::lxdebug->enter_sub;
899
  $::auth->assert('general_ledger');
899
  $::auth->assert('gl_transactions');
900 900

  
901 901
  my ($follow_ups, $follow_ups_due);
902 902

  
......
1147 1147
sub post {
1148 1148
  $main::lxdebug->enter_sub();
1149 1149

  
1150
  $main::auth->assert('general_ledger');
1150
  $main::auth->assert('gl_transactions');
1151 1151

  
1152 1152
  my $form     = $main::form;
1153 1153
  my $locale   = $main::locale;
......
1172 1172
sub post_as_new {
1173 1173
  $main::lxdebug->enter_sub();
1174 1174

  
1175
  $main::auth->assert('general_ledger');
1175
  $main::auth->assert('gl_transactions');
1176 1176

  
1177 1177
  my $form     = $main::form;
1178 1178

  
......
1185 1185
sub storno {
1186 1186
  $main::lxdebug->enter_sub();
1187 1187

  
1188
  $main::auth->assert('general_ledger');
1188
  $main::auth->assert('gl_transactions');
1189 1189

  
1190 1190
  my $form     = $main::form;
1191 1191
  my %myconfig = %main::myconfig;
bin/mozilla/rp.pl
102 102

  
103 103
my $rp_access_map = {
104 104
  'projects'           => 'report',
105
  'ar_aging'           => 'general_ledger',
106
  'ap_aging'           => 'general_ledger',
105
  'ar_aging'           => 'general_ledger | ar_transactions',
106
  'ap_aging'           => 'general_ledger | ap_transactions',
107 107
  'receipts'           => 'cash',
108 108
  'payments'           => 'cash',
109 109
  'trial_balance'      => 'report',
......
928 928
sub generate_ar_aging {
929 929
  $main::lxdebug->enter_sub();
930 930

  
931
  $main::auth->assert('general_ledger');
931
  $main::auth->assert('general_ledger | ar_transactions');
932 932

  
933 933
  my $form     = $main::form;
934 934
  my %myconfig = %main::myconfig;
......
951 951
sub generate_ap_aging {
952 952
  $main::lxdebug->enter_sub();
953 953

  
954
  $main::auth->assert('general_ledger');
954
  $main::auth->assert('general_ledger | ap_transactions');
955 955

  
956 956
  my $form     = $main::form;
957 957
  my %myconfig = %main::myconfig;
bin/mozilla/vk.pl
48 48

  
49 49
sub search_invoice {
50 50
  $main::lxdebug->enter_sub();
51
  $main::auth->assert('general_ledger | invoice_edit');
51
  $main::auth->assert('ar_transactions | ap_transactions | invoice_edit');
52 52

  
53 53
  my $form     = $main::form;
54 54
  my %myconfig = %main::myconfig;
......
92 92
sub invoice_transactions {
93 93
  $main::lxdebug->enter_sub();
94 94

  
95
  $main::auth->assert('general_ledger | invoice_edit');
95
  $main::auth->assert('ar_transactions | ap_transactions | invoice_edit');
96 96

  
97 97
  my $form     = $main::form;
98 98
  my %myconfig = %main::myconfig;
doc/changelog
6 6

  
7 7
kleinere neue Features und Detailverbesserungen:
8 8

  
9
  - Verfeinerung der Rechte für Finanzbuchhaltung: Es können nun für Dialogbuchungen,
10
    Debitoren- und Kreditorenbuchungen extra Rechte vergeben werden
11

  
9 12
  - Weiterer Bericht in der Rubrik Lager: Lagerentnahme
10 13
    Gibt eine Statistik über Lagerbewegungen, pro Monat/Quartal/Jahr.
11 14

  
menus/user/00-erp.yaml
564 564
  name: Add Transaction
565 565
  icon: transaction_add
566 566
  order: 100
567
  access: general_ledger
567
  access: gl_transactions
568 568
  module: gl.pl
569 569
  params:
570 570
    action: add
......
573 573
  name: Add AR Transaction
574 574
  icon: ar_transaction_add
575 575
  order: 200
576
  access: general_ledger
576
  access: ar_transactions
577 577
  module: ar.pl
578 578
  params:
579 579
    action: add
......
582 582
  name: Add AP Transaction
583 583
  icon: ap_transaction_add
584 584
  order: 300
585
  access: general_ledger
585
  access: ap_transactions
586 586
  module: ap.pl
587 587
  params:
588 588
    action: add
sql/Pg-upgrade2-auth/split_transaction_rights.pl
1
# @tag: split_transaction_rights
2
# @description: Finanzbuchhaltungsrechte für Buchungen aufspalten
3
# @depends: release_3_4_0 master_rights_position_gaps
4
# @charset: utf-8
5
# @locales: General Ledger Transaction
6
# @locales: AR Transactions
7
# @locales: AP Transactions
8

  
9

  
10
package SL::DBUpgrade2::split_transaction_rights;
11

  
12
use strict;
13
use utf8;
14

  
15
use parent qw(SL::DBUpgrade2::Base);
16

  
17
use SL::DBUtils;
18

  
19
sub run {
20
  my ($self) = @_;
21

  
22
  $self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES (3130,'gl_transactions','General Ledger Transaction')");
23
  $self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES (3150,'ar_transactions','AR Transactions')");
24
  $self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES (3170,'ap_transactions','AP Transactions')");
25
  $self->db_query("UPDATE auth.master_rights SET description='General Ledger' WHERE name='general_ledger'");
26

  
27
  my $groups = $main::auth->read_groups();
28

  
29
  foreach my $group (values %{$groups}) {
30
    $group->{rights}->{gl_transactions} = $group->{rights}->{general_ledger};
31
    $group->{rights}->{ar_transactions} = $group->{rights}->{general_ledger};
32
    $group->{rights}->{ap_transactions} = $group->{rights}->{general_ledger};
33
    $main::auth->save_group($group);
34
  }
35

  
36
  return 1;
37
} # end run
38

  
39
1;
40

  

Auch abrufbar als: Unified diff