Revision 58c266ea
Von Martin Helmling vor fast 8 Jahren hinzugefügt
SL/Controller/EmailJournal.pm | ||
---|---|---|
27 | 27 |
sub action_list { |
28 | 28 |
my ($self) = @_; |
29 | 29 |
|
30 |
$::auth->assert('email_journal'); |
|
31 |
|
|
30 | 32 |
if ( $::instance_conf->get_email_journal == 0 ) { |
31 | 33 |
flash('info', $::locale->text('Storing the emails in the journal is currently disabled in the client configuration.')); |
32 | 34 |
} |
... | ... | |
39 | 41 |
sub action_show { |
40 | 42 |
my ($self) = @_; |
41 | 43 |
|
44 |
$::auth->assert('email_journal'); |
|
45 |
|
|
42 | 46 |
my $back_to = $::form->{back_to} || $self->url_for(action => 'list'); |
43 | 47 |
|
44 | 48 |
$self->entry(SL::DB::EmailJournal->new(id => $::form->{id})->load); |
... | ... | |
55 | 59 |
sub action_download_attachment { |
56 | 60 |
my ($self) = @_; |
57 | 61 |
|
62 |
$::auth->assert('email_journal'); |
|
63 |
|
|
58 | 64 |
my $attachment = SL::DB::EmailJournalAttachment->new(id => $::form->{id})->load; |
59 | 65 |
|
60 | 66 |
if (!$self->can_view_all && ($attachment->email_journal->sender_id != SL::DB::Manager::Employee->current->id)) { |
... | ... | |
80 | 86 |
# helpers |
81 | 87 |
# |
82 | 88 |
|
83 |
sub init_can_view_all { $::auth->assert('admin', 1) }
|
|
89 |
sub init_can_view_all { $::auth->assert('email_employee_readall', 1) }
|
|
84 | 90 |
|
85 | 91 |
sub init_models { |
86 | 92 |
my ($self) = @_; |
image/icons/svg/mail_journal.svg | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
2 |
<!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
|
3 |
|
|
4 |
<svg |
|
5 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
6 |
xmlns:cc="http://creativecommons.org/ns#" |
|
7 |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
|
8 |
xmlns:svg="http://www.w3.org/2000/svg" |
|
9 |
xmlns="http://www.w3.org/2000/svg" |
|
10 |
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
|
11 |
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
|
12 |
version="1.1" |
|
13 |
id="Layer_1" |
|
14 |
x="0px" |
|
15 |
y="0px" |
|
16 |
width="16" |
|
17 |
height="16" |
|
18 |
viewBox="0 0 16 16" |
|
19 |
enable-background="new 0 0 94.398 54.766" |
|
20 |
xml:space="preserve" |
|
21 |
inkscape:version="0.48.1 " |
|
22 |
sodipodi:docname="mail.svg" |
|
23 |
inkscape:export-filename="O:\15-Artwork\Icons\od\erp\menuv3\SVG\16\mail.png" |
|
24 |
inkscape:export-xdpi="14.4" |
|
25 |
inkscape:export-ydpi="14.4"><metadata |
|
26 |
id="metadata9"><rdf:RDF><cc:Work |
|
27 |
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type |
|
28 |
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs |
|
29 |
id="defs7" /><sodipodi:namedview |
|
30 |
pagecolor="#ffffff" |
|
31 |
bordercolor="#666666" |
|
32 |
borderopacity="1" |
|
33 |
objecttolerance="10" |
|
34 |
gridtolerance="10" |
|
35 |
guidetolerance="10" |
|
36 |
inkscape:pageopacity="0" |
|
37 |
inkscape:pageshadow="2" |
|
38 |
inkscape:window-width="1920" |
|
39 |
inkscape:window-height="1018" |
|
40 |
id="namedview5" |
|
41 |
showgrid="false" |
|
42 |
inkscape:zoom="28.449018" |
|
43 |
inkscape:cx="13.275149" |
|
44 |
inkscape:cy="11.042062" |
|
45 |
inkscape:window-x="1358" |
|
46 |
inkscape:window-y="-8" |
|
47 |
inkscape:window-maximized="1" |
|
48 |
inkscape:current-layer="Layer_1" /> |
|
49 |
<path |
|
50 |
d="m 15.499029,4.4687988 c -3.18e-4,-0.024312 -0.0038,-0.048942 -0.0073,-0.073254 -0.0024,-0.017161 -0.0033,-0.035117 -0.0071,-0.051802 -0.0044,-0.020816 -0.01224,-0.040838 -0.01891,-0.061177 -0.0064,-0.019545 -0.01176,-0.039408 -0.02002,-0.05784 -0.0073,-0.016526 -0.01732,-0.031939 -0.02606,-0.048147 -0.01144,-0.020975 -0.02256,-0.042268 -0.03639,-0.061654 -0.0025,-0.00334 -0.0037,-0.00715 -0.0062,-0.010487 -0.0089,-0.011918 -0.0197,-0.021293 -0.02924,-0.032416 -0.01494,-0.017479 -0.02956,-0.035435 -0.04624,-0.051007 -0.01478,-0.014142 -0.03051,-0.026219 -0.04672,-0.038613 -0.01653,-0.012871 -0.03242,-0.025742 -0.04989,-0.037024 -0.01732,-0.010805 -0.03591,-0.020022 -0.05387,-0.029238 -0.01843,-0.00953 -0.03671,-0.018909 -0.05625,-0.026537 -0.01923,-0.00747 -0.03909,-0.012712 -0.05895,-0.018274 -0.01955,-0.0054 -0.03893,-0.011282 -0.05927,-0.014937 -0.02288,-0.00413 -0.04576,-0.0054 -0.06881,-0.00699 -0.01462,-0.00111 -0.02844,-0.00445 -0.04322,-0.00445 H 1.1356059 c -0.014619,0 -0.028126,0.00334 -0.042427,0.00429 -0.0232,0.00159 -0.046717,0.00286 -0.069599,0.00699 -0.020022,0.00365 -0.038772,0.00938 -0.0579991,0.014619 -0.0204983,0.00572 -0.0408377,0.011123 -0.0605415,0.01875 -0.0187504,0.00747 -0.0365473,0.016526 -0.0543443,0.025583 -0.0189093,0.00953 -0.0376596,0.01875 -0.0557744,0.030191 -0.0170025,0.010964 -0.0325748,0.023517 -0.048306,0.035753 -0.0165258,0.012871 -0.0330515,0.025424 -0.0484649,0.040043 -0.0163669,0.015731 -0.030668,0.033052 -0.0452869,0.050372 -0.009693,0.011282 -0.0208161,0.020816 -0.0297146,0.032893 -0.002384,0.00334 -0.003814,0.00699 -0.006197,0.010487 -0.0138244,0.019386 -0.0246297,0.04052 -0.0362295,0.061495 -0.008898,0.016208 -0.0187504,0.031621 -0.0260598,0.048147 -0.008263,0.018592 -0.0135066,0.038454 -0.0200216,0.05784 -0.006674,0.020339 -0.0143011,0.04052 -0.0189093,0.061336 C 0.512076,4.3604258 0.510964,4.3782228 0.50858,4.3955428 0.505243,4.4198548 0.501747,4.4441668 0.501271,4.4687968 0.50111231,4.4727713 0.5,4.476585 0.5,4.4805575 v 7.4311865 c 0,0.351014 0.28459255,0.635606 0.6356059,0.635606 H 14.864376 c 0.351014,0 0.635606,-0.284592 0.635606,-0.635606 V 4.4805575 c 1.59e-4,-0.00397 -7.94e-4,-0.00779 -9.53e-4,-0.011759 z M 12.924189,5.1161634 7.9999912,8.7302188 3.0759521,5.1161634 H 12.924189 z M 1.771212,11.27598 V 5.7354025 l 5.8526594,4.2957425 c 0.1120255,0.08199 0.2440727,0.12299 0.3761198,0.12299 0.1318882,0 0.2639353,-0.04131 0.3759609,-0.12299 L 14.22877,5.7354025 V 11.27598 H 1.771212 z" |
|
51 |
id="path3" |
|
52 |
inkscape:connector-curvature="0" |
|
53 |
style="fill:#505050;fill-opacity:1" /> |
|
54 |
</svg> |
locale/de/all | ||
---|---|---|
1043 | 1043 |
'Duplicate in CSV file' => 'Duplikat in CSV-Datei', |
1044 | 1044 |
'Duplicate in database' => 'Duplikat in Datenbank', |
1045 | 1045 |
'During the next update a taxkey 0 with tax rate of 0 will automatically created.' => 'Beim nächsten Ausführen des Updates wird ein Steuerschlüssel 0 mit einem Steuersatz von 0% automatisch erzeugt.', |
1046 |
'E-Mail is sent to #1' => 'E-Mail wurde an #1 gesendet', |
|
1046 |
'E-Mail is sent to #1' => 'Die E-Mail wurde an \'#1\' gesendet', |
|
1047 |
'E-Mail-Journal' => 'E-Mail-Journal', |
|
1047 | 1048 |
'E-mail' => 'E-Mail', |
1048 | 1049 |
'E-mail Statement to' => 'Fälligkeitsabrechnung als E-Mail an', |
1049 | 1050 |
'E-mail address missing!' => 'E-Mail-Adresse fehlt!', |
menus/user/00-erp.yaml | ||
---|---|---|
993 | 993 |
name: Email journal |
994 | 994 |
order: 200 |
995 | 995 |
module: controller.pl |
996 |
icon: mail_journal |
|
996 | 997 |
params: |
997 | 998 |
action: EmailJournal/list |
998 | 999 |
- id: system |
sql/Pg-upgrade2-auth/mail_journal_rights.pl | ||
---|---|---|
1 |
# @tag: mail_journal_rights |
|
2 |
# @description: Extra right for email journal |
|
3 |
# @depends: master_rights_position_gaps |
|
4 |
# @locales: E-Mail-Journal |
|
5 |
# @locales: Read all employee e-mails |
|
6 |
|
|
7 |
package SL::DBUpgrade2::mail_journal_rights; |
|
8 |
|
|
9 |
use strict; |
|
10 |
use utf8; |
|
11 |
|
|
12 |
use parent qw(SL::DBUpgrade2::Base); |
|
13 |
|
|
14 |
use SL::DBUtils; |
|
15 |
|
|
16 |
sub run { |
|
17 |
my ($self) = @_; |
|
18 |
|
|
19 |
$self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES (?, ?, ?)", bind => $_) for |
|
20 |
[ 4450, 'email_journal' , 'E-Mail-Journal' ], |
|
21 |
[ 4480, 'email_employee_readall', 'Read all employee e-mails' ]; |
|
22 |
|
|
23 |
my $groups = $main::auth->read_groups(); |
|
24 |
|
|
25 |
foreach my $group (values %{$groups}) { |
|
26 |
$group->{rights}->{email_journal} = $group->{rights}->{productivity}; |
|
27 |
$group->{rights}->{email_employee_readall} = $group->{rights}->{admin}; |
|
28 |
$main::auth->save_group($group); |
|
29 |
} |
|
30 |
|
|
31 |
return 1; |
|
32 |
} # end run |
|
33 |
|
|
34 |
1; |
Auch abrufbar als: Unified diff
Eigenes Recht für E-Mail-Journal
-E-Mail Journal Icon hinzugefügt
-Recht für E-Mail Journal hinzugefügt, von "productivity" abgeleitet
-Recht für Zugriff auf mails von Mitarbeitern von "admin" abgeleitet
-Das Recht "email_journal" im EmailJournal - Controller eingebaut