Revision 3ad96f21
Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
84 | 84 |
'sales_quotation' => 'sales_quotation_edit', |
85 | 85 |
}; |
86 | 86 |
|
87 |
my $oe_view_access_map = { |
|
88 |
'sales_order' => 'sales_order_edit | sales_order_view', |
|
89 |
'purchase_order' => 'purchase_order_edit | purchase_order_view', |
|
90 |
'request_quotation' => 'request_quotation_edit | request_quotation_view', |
|
91 |
'sales_quotation' => 'sales_quotation_edit | sales_quotation_view', |
|
92 |
}; |
|
93 |
|
|
87 | 94 |
sub check_oe_access { |
95 |
my (%params) = @_; |
|
88 | 96 |
my $form = $main::form; |
89 | 97 |
|
90 |
my $right = $oe_access_map->{$form->{type}}; |
|
98 |
my $right = ($params{with_view}) ? $oe_view_access_map->{$form->{type}} : $oe_access_map->{$form->{type}};
|
|
91 | 99 |
$right ||= 'DOES_NOT_EXIST'; |
92 | 100 |
|
93 | 101 |
$main::auth->assert($right); |
... | ... | |
926 | 934 |
my %myconfig = %main::myconfig; |
927 | 935 |
my $locale = $main::locale; |
928 | 936 |
|
929 |
check_oe_access(); |
|
937 |
check_oe_access(with_view => 1);
|
|
930 | 938 |
|
931 | 939 |
if ($form->{type} eq 'purchase_order') { |
932 | 940 |
$form->{vc} = 'vendor'; |
... | ... | |
1017 | 1025 |
my $cgi = $::request->{cgi}; |
1018 | 1026 |
|
1019 | 1027 |
my %params = @_; |
1020 |
check_oe_access(); |
|
1028 |
check_oe_access(with_view => 1);
|
|
1021 | 1029 |
|
1022 | 1030 |
my $ordnumber = ($form->{type} =~ /_order$/) ? "ordnumber" : "quonumber"; |
1023 | 1031 |
|
Auch abrufbar als: Unified diff
Recht: Ansehen von Belegen bei Angebot und Auftrag berücksichtigen
Ansehen nur im neuen Auftrags-Controller