Revision 58c266ea
Von Martin Helmling vor etwa 8 Jahren hinzugefügt
SL/Controller/EmailJournal.pm | ||
---|---|---|
sub action_list {
|
||
my ($self) = @_;
|
||
|
||
$::auth->assert('email_journal');
|
||
|
||
if ( $::instance_conf->get_email_journal == 0 ) {
|
||
flash('info', $::locale->text('Storing the emails in the journal is currently disabled in the client configuration.'));
|
||
}
|
||
... | ... | |
sub action_show {
|
||
my ($self) = @_;
|
||
|
||
$::auth->assert('email_journal');
|
||
|
||
my $back_to = $::form->{back_to} || $self->url_for(action => 'list');
|
||
|
||
$self->entry(SL::DB::EmailJournal->new(id => $::form->{id})->load);
|
||
... | ... | |
sub action_download_attachment {
|
||
my ($self) = @_;
|
||
|
||
$::auth->assert('email_journal');
|
||
|
||
my $attachment = SL::DB::EmailJournalAttachment->new(id => $::form->{id})->load;
|
||
|
||
if (!$self->can_view_all && ($attachment->email_journal->sender_id != SL::DB::Manager::Employee->current->id)) {
|
||
... | ... | |
# helpers
|
||
#
|
||
|
||
sub init_can_view_all { $::auth->assert('admin', 1) }
|
||
sub init_can_view_all { $::auth->assert('email_employee_readall', 1) }
|
||
|
||
sub init_models {
|
||
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