Revision cdab9f5d
Von Kivitendo Admin vor mehr als 8 Jahren hinzugefügt
SL/Controller/RecordLinks.pm | ||
---|---|---|
23 | 23 |
scalar => [ qw(object object_model object_id link_type link_direction link_type_desc) ], |
24 | 24 |
); |
25 | 25 |
|
26 |
__PACKAGE__->run_before('check_auth'); |
|
26 | 27 |
__PACKAGE__->run_before('check_object_params', only => [ qw(ajax_list ajax_delete ajax_add_select_type ajax_add_filter ajax_add_list ajax_add_do) ]); |
27 | 28 |
__PACKAGE__->run_before('check_link_params', only => [ qw( ajax_add_list ajax_add_do) ]); |
28 | 29 |
|
... | ... | |
217 | 218 |
return 1; |
218 | 219 |
} |
219 | 220 |
|
221 |
sub check_auth { |
|
222 |
$::auth->assert('record_links'); |
|
223 |
} |
|
224 |
|
|
220 | 225 |
1; |
doc/changelog | ||
---|---|---|
2 | 2 |
# Veränderungen von kivitendo # |
3 | 3 |
############################### |
4 | 4 |
|
5 |
2016-xx-xx - Release 3.4.x Unstable |
|
6 |
|
|
7 |
- Neues Recht "Verknüpfte Belege", standardmäßig erlaubt. Betrifft alle |
|
8 |
Belege und die Projektstammdaten |
|
9 |
|
|
5 | 10 |
2016-07-05 - Release 3.4.1 |
6 | 11 |
|
7 | 12 |
kleinere neue Features und Detailverbesserungen: |
... | ... | |
66 | 71 |
- Bugfix #165 inventory.shippingdate wird nicht konsequent benutzt |
67 | 72 |
- Bugfix #166 Presenter Links gehen im ReportGenerator Export kaputt |
68 | 73 |
|
69 |
2016-03-12 - Release 3.4.0 |
|
70 | 74 |
|
71 | 75 |
Größere neue Features: |
72 | 76 |
|
sql/Pg-upgrade2-auth/record_links_rights.pl | ||
---|---|---|
1 |
# @tag: record_links_rights |
|
2 |
# @description: Setzt das Recht um den Tab verknüpfte Belege zu sehen, per Default erlaubt (wie vorher auch) |
|
3 |
# @depends: release_3_4_0 master_rights_position_gaps |
|
4 |
package SL::DBUpgrade2::record_links_rights; |
|
5 |
|
|
6 |
use strict; |
|
7 |
use utf8; |
|
8 |
|
|
9 |
use parent qw(SL::DBUpgrade2::Base); |
|
10 |
|
|
11 |
use SL::DBUtils; |
|
12 |
|
|
13 |
sub run { |
|
14 |
my ($self) = @_; |
|
15 |
|
|
16 |
$self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES ( 4750, 'record_links', 'Linked Records')"); |
|
17 |
|
|
18 |
my $groups = $main::auth->read_groups(); |
|
19 |
|
|
20 |
foreach my $group (values %{$groups}) { |
|
21 |
$group->{rights}->{record_links} = 1; |
|
22 |
$main::auth->save_group($group); |
|
23 |
} |
|
24 |
|
|
25 |
return 1; |
|
26 |
} # end run |
|
27 |
|
|
28 |
1; |
templates/webpages/ap/form_header.html | ||
---|---|---|
83 | 83 |
<ul> |
84 | 84 |
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li> |
85 | 85 |
[%- IF id %] |
86 |
[%- IF AUTH.assert('record_links', 1) %] |
|
86 | 87 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
88 |
[%- END %] |
|
87 | 89 |
<li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li> |
88 | 90 |
[%- END %] |
89 | 91 |
</ul> |
templates/webpages/ar/form_header.html | ||
---|---|---|
24 | 24 |
<ul> |
25 | 25 |
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li> |
26 | 26 |
[%- IF id %] |
27 |
[% IF AUTH.assert('record_links', 1) %] |
|
27 | 28 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Invoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
29 |
[%- END %] |
|
28 | 30 |
<li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li> |
29 | 31 |
[%- END %] |
30 | 32 |
</ul> |
templates/webpages/do/form_header.html | ||
---|---|---|
53 | 53 |
[%- IF INSTANCE_CONF.get_webdav %] |
54 | 54 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
55 | 55 |
[%- END %] |
56 |
[%- IF id %] |
|
56 |
[%- IF id AND AUTH.assert('record_links', 1) %]
|
|
57 | 57 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=DeliveryOrder&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
58 | 58 |
[%- END %] |
59 | 59 |
</ul> |
templates/webpages/ir/form_header.html | ||
---|---|---|
34 | 34 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
35 | 35 |
[%- END %] |
36 | 36 |
[%- IF id %] |
37 |
[%- IF AUTH.assert('record_links', 1) %] |
|
37 | 38 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
39 |
[%- END %] |
|
38 | 40 |
<li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li> |
39 | 41 |
[%- END %] |
40 | 42 |
</ul> |
templates/webpages/is/form_header.html | ||
---|---|---|
35 | 35 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
36 | 36 |
[%- END %] |
37 | 37 |
[%- IF id %] |
38 |
[%- IF AUTH.assert('record_links', 1) %] |
|
38 | 39 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Invoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
40 |
[%- END %] |
|
39 | 41 |
[%- IF AUTH.assert('general_ledger', 1) %] |
40 | 42 |
<li><a href="[% 'controller.pl?action=AccTrans/list_transactions&trans_id=' _ HTML.url(id) | html %]">[% LxERP.t8('Transactions') %]</a></li> |
41 | 43 |
[%- END %] |
templates/webpages/oe/form_header.html | ||
---|---|---|
37 | 37 |
[%- IF INSTANCE_CONF.get_webdav %] |
38 | 38 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
39 | 39 |
[%- END %] |
40 |
[%- IF id %] |
|
40 |
[%- IF id AND AUTH.assert('record_links', 1) %]
|
|
41 | 41 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Order&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
42 | 42 |
[%- END %] |
43 | 43 |
</ul> |
templates/webpages/project/form.html | ||
---|---|---|
17 | 17 |
[%- IF CUSTOM_VARIABLES.size %] |
18 | 18 |
<li><a href="#custom_variables">[% 'Custom Variables' | $T8 %]</a></li> |
19 | 19 |
[%- END %] |
20 |
[%- IF SELF.project.id %] |
|
20 |
[%- IF SELF.project.id and AUTH.assert('record_links', 1) %]
|
|
21 | 21 |
<li><a href="#linked_records">[% 'Linked Records' | $T8 %]</a></li> |
22 | 22 |
[%- END %] |
23 | 23 |
</ul> |
... | ... | |
32 | 32 |
</div> |
33 | 33 |
[%- END %] |
34 | 34 |
|
35 |
[%- IF SELF.project.id %] |
|
35 |
[%- IF SELF.project.id and AUTH.assert('record_links', 1) %]
|
|
36 | 36 |
<div id="linked_records"> |
37 | 37 |
[%- PROCESS 'project/_linked_records.html' records=SELF.linked_records %] |
38 | 38 |
</div> |
Auch abrufbar als: Unified diff
Neues Recht "Verknüpfte Belege"
Hintergrund ist, daß es derzeit z.B. möglich ist, daß Benutzer die nur
Rechte haben um Angebote zu sehen, über die verknüpften Belege eine
Übersicht über alle anderen Belege aus dem Workflow, bis hin zur
Rechnung zu sehen. Zumindest eine Zusammenfassung (Datum, Beträge), ohne
jedoch die Belege öffnen zu können. Dies ist aber nicht immer gewünscht,
daher kann man jetzt die Reiter für verknüpfte Belege komplett
ausblenden.
Eine bessere Lösung wäre nur die Belege anzuzeigen, für die der Benutzer
auch Bearbeitungsrechte hat.