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) = @_; |
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