Revision 152d10ef
Von Niclas Zimmermann vor mehr als 11 Jahren hinzugefügt
SL/Auth.pm | ||
---|---|---|
1060 | 1060 |
["email_bcc", $locale->text("May set the BCC field when sending emails")], |
1061 | 1061 |
["config", $locale->text("Change kivitendo installation settings (all menu entries beneath 'System')")], |
1062 | 1062 |
["admin", $locale->text("Administration (Used to access instance administration from user logins)")], |
1063 |
["productivity", $locale->text("Productivity")], |
|
1064 |
["display_admin_link", $locale->text("Show administration link")], |
|
1065 | 1063 |
); |
1066 | 1064 |
|
1067 | 1065 |
return @all_rights; |
bin/mozilla/fu.pl | ||
---|---|---|
10 | 10 |
sub _collect_links { |
11 | 11 |
$main::lxdebug->enter_sub(); |
12 | 12 |
|
13 |
$main::auth->assert('productivity'); |
|
14 |
|
|
15 | 13 |
my $dest = shift; |
16 | 14 |
|
17 | 15 |
my $form = $main::form; |
... | ... | |
30 | 28 |
sub add { |
31 | 29 |
$main::lxdebug->enter_sub(); |
32 | 30 |
|
33 |
$main::auth->assert('productivity'); |
|
34 |
|
|
35 | 31 |
my $form = $main::form; |
36 | 32 |
my %myconfig = %main::myconfig; |
37 | 33 |
my $locale = $main::locale; |
... | ... | |
61 | 57 |
sub edit { |
62 | 58 |
$main::lxdebug->enter_sub(); |
63 | 59 |
|
64 |
$main::auth->assert('productivity'); |
|
65 |
|
|
66 | 60 |
my $form = $main::form; |
67 | 61 |
my $locale = $main::locale; |
68 | 62 |
|
... | ... | |
88 | 82 |
sub display_form { |
89 | 83 |
$main::lxdebug->enter_sub(); |
90 | 84 |
|
91 |
$main::auth->assert('productivity'); |
|
92 |
|
|
93 | 85 |
my $form = $main::form; |
94 | 86 |
|
95 | 87 |
$form->get_lists("employees" => "EMPLOYEES"); |
... | ... | |
110 | 102 |
sub save_follow_up { |
111 | 103 |
$main::lxdebug->enter_sub(); |
112 | 104 |
|
113 |
$main::auth->assert('productivity'); |
|
114 |
|
|
115 | 105 |
my $form = $main::form; |
116 | 106 |
my $locale = $main::locale; |
117 | 107 |
|
... | ... | |
149 | 139 |
sub finish { |
150 | 140 |
$main::lxdebug->enter_sub(); |
151 | 141 |
|
152 |
$main::auth->assert('productivity'); |
|
153 |
|
|
154 | 142 |
my $form = $main::form; |
155 | 143 |
my $locale = $main::locale; |
156 | 144 |
|
... | ... | |
187 | 175 |
sub delete { |
188 | 176 |
$main::lxdebug->enter_sub(); |
189 | 177 |
|
190 |
$main::auth->assert('productivity'); |
|
191 |
|
|
192 | 178 |
my $form = $main::form; |
193 | 179 |
my $locale = $main::locale; |
194 | 180 |
|
... | ... | |
225 | 211 |
sub search { |
226 | 212 |
$main::lxdebug->enter_sub(); |
227 | 213 |
|
228 |
$main::auth->assert('productivity'); |
|
229 |
|
|
230 | 214 |
my $form = $main::form; |
231 | 215 |
my $locale = $main::locale; |
232 | 216 |
|
... | ... | |
244 | 228 |
sub report { |
245 | 229 |
$main::lxdebug->enter_sub(); |
246 | 230 |
|
247 |
$main::auth->assert('productivity'); |
|
248 |
|
|
249 | 231 |
my $form = $main::form; |
250 | 232 |
my %myconfig = %main::myconfig; |
251 | 233 |
my $locale = $main::locale; |
... | ... | |
358 | 340 |
sub report_for_todo_list { |
359 | 341 |
$main::lxdebug->enter_sub(); |
360 | 342 |
|
361 |
$main::auth->assert('productivity'); |
|
362 |
|
|
363 | 343 |
my $form = $main::form; |
364 | 344 |
|
365 | 345 |
my @report_params = qw(created_for subject body reference follow_up_date_from follow_up_date_to itime_from itime_to due_only all_users done not_done); |
... | ... | |
399 | 379 |
sub edit_access_rights { |
400 | 380 |
$main::lxdebug->enter_sub(); |
401 | 381 |
|
402 |
$main::auth->assert('productivity'); |
|
403 |
|
|
404 | 382 |
my $form = $main::form; |
405 | 383 |
my $locale = $main::locale; |
406 | 384 |
|
... | ... | |
421 | 399 |
sub save_access_rights { |
422 | 400 |
$main::lxdebug->enter_sub(); |
423 | 401 |
|
424 |
$main::auth->assert('productivity'); |
|
425 |
|
|
426 | 402 |
my $form = $main::form; |
427 | 403 |
my $locale = $main::locale; |
428 | 404 |
|
... | ... | |
451 | 427 |
} |
452 | 428 |
|
453 | 429 |
sub save { |
454 |
$main::auth->assert('productivity'); |
|
455 |
|
|
456 | 430 |
if ($main::form->{save_nextsub}) { |
457 | 431 |
call_sub($main::form->{save_nextsub}); |
458 | 432 |
} else { |
bin/mozilla/login.pl | ||
---|---|---|
46 | 46 |
$main::lxdebug->enter_sub(); |
47 | 47 |
|
48 | 48 |
my %myconfig = %main::myconfig; |
49 |
$form->{todo_list} = create_todo_list('login_screen' => 1) if (!$form->{no_todo_list}) and ($main::auth->check_right($form->{login}, 'productivity'));
|
|
49 |
$form->{todo_list} = create_todo_list('login_screen' => 1) if (!$form->{no_todo_list}); |
|
50 | 50 |
|
51 | 51 |
$form->{stylesheet} = $myconfig{stylesheet}; |
52 | 52 |
$form->{title} = $::locale->text('kivitendo'); |
bin/mozilla/todo.pl | ||
---|---|---|
34 | 34 |
sub create_todo_list { |
35 | 35 |
$main::lxdebug->enter_sub(); |
36 | 36 |
|
37 |
$main::auth->assert('productivity'); |
|
38 |
|
|
39 | 37 |
my $form = $main::form; |
40 | 38 |
|
41 | 39 |
my %params = @_; |
... | ... | |
64 | 62 |
sub show_todo_list { |
65 | 63 |
$main::lxdebug->enter_sub(); |
66 | 64 |
|
67 |
$main::auth->assert('productivity'); |
|
68 |
|
|
69 | 65 |
my $form = $main::form; |
70 | 66 |
my $locale = $main::locale; |
71 | 67 |
|
... | ... | |
81 | 77 |
sub todo_list_follow_ups { |
82 | 78 |
$main::lxdebug->enter_sub(); |
83 | 79 |
|
84 |
$main::auth->assert('productivity'); |
|
85 |
|
|
86 | 80 |
require "bin/mozilla/fu.pl"; |
87 | 81 |
|
88 | 82 |
my $content = report_for_todo_list(); |
... | ... | |
95 | 89 |
sub todo_list_overdue_sales_quotations { |
96 | 90 |
$main::lxdebug->enter_sub(); |
97 | 91 |
|
98 |
$main::auth->assert('productivity'); |
|
99 |
|
|
100 | 92 |
require "bin/mozilla/oe.pl"; |
101 | 93 |
|
102 | 94 |
my $content = report_for_todo_list(); |
doc/changelog | ||
---|---|---|
30 | 30 |
|
31 | 31 |
Kleinere neue Features und Detailverbesserungen: |
32 | 32 |
|
33 |
- Recht für Produktivität und für Anzeige des Links zum Administrationsmenü |
|
34 |
Man kann den gesamten Produktivitätsbereich jetzt nur noch nutzen, wenn man die entsprechenden Rechte hat. |
|
35 |
Auch der Link Unter dem Menü-Punkt Programm zum Administrationsmenü wird jetzt nur noch |
|
36 |
angezeigt, wenn man entsprechendes Recht hat. |
|
37 |
Durch ein Upgrade wird allerdings bei schon bestehenden Benutzern automatisch die oben genannten beiden Rechte |
|
38 |
gesetzt, so dass alle die Produktivität vorher nutzen durften auch weiterhin nutzen dürfen, bzw. so dass |
|
39 |
bei allen, bei denen der Link auf das Admin-Menü angezeigt wurde, er auch weiterhin angezeigt wird. |
|
40 |
|
|
41 | 33 |
- Stückliste für Lieferschein ausdrucken |
42 | 34 |
Stücklisten-Details (Haken bei Warenliste) für Erzeugnisse wurden seit 2009 |
43 | 35 |
(TEMPLATE_ARRAY Änderung) nicht mehr ausgedruckt, |
locale/de/all | ||
---|---|---|
1810 | 1810 |
'Show Salesman' => 'Verkäufer anzeigen', |
1811 | 1811 |
'Show TODO list' => 'Aufgabenliste anzeigen', |
1812 | 1812 |
'Show Transfer via default' => 'Ein- / Auslagern über Standardlagerplatz anzeigen', |
1813 |
'Show administration link' => 'Link zur Administration anzeigen', |
|
1814 | 1813 |
'Show by default' => 'Standardmäßig anzeigen', |
1815 | 1814 |
'Show custom variable search inputs' => 'Suchoptionen für Benutzerdefinierte Variablen verstecken', |
1816 | 1815 |
'Show delete button in purchase delivery orders?' => 'Soll der "Löschen"-Knopf bei Einkaufslieferscheinen angezeigt werden?', |
menu.ini | ||
---|---|---|
476 | 476 |
|
477 | 477 |
|
478 | 478 |
[Productivity] |
479 |
ACCESS=productivity |
|
480 | 479 |
|
481 | 480 |
[Productivity--Show TODO list] |
482 | 481 |
module=todo.pl |
... | ... | |
705 | 704 |
action=config |
706 | 705 |
|
707 | 706 |
[Program--Administration area] |
708 |
ACCESS=display_admin_link |
|
709 | 707 |
module=admin.pl |
710 | 708 |
action=login |
711 | 709 |
|
sql/Pg-upgrade2/productivity_rights.pl | ||
---|---|---|
1 |
# @tag: productivity_rights |
|
2 |
# @description: Setzt das Recht die Produktivität einzusehen und das Recht den Link zum Admin-Menü anzuzeigen wieder wie vorher |
|
3 |
# @depends: release_3_0_0 |
|
4 |
package SL::DBUpgrade2::productivity_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 |
my $groups = $main::auth->read_groups(); |
|
17 |
|
|
18 |
foreach my $group (values %{$groups}) { |
|
19 |
$group->{rights}->{productivity} = 1 unless defined $group->{rights}->{productivity}; |
|
20 |
$group->{rights}->{display_admin_link} = 1 unless defined $group->{rights}->{display_admin_link}; |
|
21 |
$main::auth->save_group($group); |
|
22 |
} |
|
23 |
|
|
24 |
return 1; |
|
25 |
} # end run |
|
26 |
|
|
27 |
1; |
Auch abrufbar als: Unified diff
Revert "Recht für Anzeige der Produktivität"
This reverts commit a27cd427a2689b49a7642884edd2d24555305a4b.