Skip to content

Commit

Permalink
Merge branch 'dev' into reneeb_translate_replace_parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
dennykorsukewitz authored Jan 28, 2025
2 parents e2afbfa + ef375ac commit 49266bd
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 201 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The following persons contributed to Znuny:
* Henrik Vetter <[email protected]>
* IB Development Team <[email protected]>
* Igor Djuric <[email protected]>
* Ivo Oliveira <[email protected]>
* Jan Steinweg <[email protected]>
* JannisKleinrensing <[email protected]>
* Jaroslav Balaz <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# 7.1.4 2024-??-??
- 2025-01-21 Fixed Bug - Problem when handling errors in the owner field in the activity dialog. Thanks to Daylton Rodrigues (@dayltonr) for reporting. [#627](https://github.com/znuny/Znuny/issues/627).
- 2025-01-16 Increased size of columns profile_key and profile_value of database table search_profile.
- 2025-01-15 Sector Nord AG: Fixed module check for calendar plugin. Thanks to Sector Nord AG (@jsinagowitz). [PR#623](https://github.com/znuny/Znuny/pull/623)
- 2024-12-23 Improved ACL checks in ticket overview modules.
- 2024-12-10 System configuration option SendmailEncodingForce is now a selection instead of a text field.
- 2024-12-10 Fixed "From" and "To" not being expandable for an article in ticket zoom. Thanks to Oliver Freyermuth (@olifre) for reporting. [#605](https://github.com/znuny/Znuny/issues/605)
- 2024-12-09 Fixed multiple notifications being sent for empty process tickets (event NotificationNewTicket).
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/AgentTicketProcess.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3572,7 +3572,7 @@ sub _RenderOwner {

# set server errors
my $ServerError = '';
if ( IsHashRefWithData( $Param{Error} ) && $Param{Error}->{'Owner'} ) {
if ( IsHashRefWithData( $Param{Error} ) && $Param{Error}->{'OwnerID'} ) {
$ServerError = 'ServerError';
}

Expand Down
101 changes: 16 additions & 85 deletions Kernel/Output/HTML/TicketOverview/Medium.pm
Original file line number Diff line number Diff line change
Expand Up @@ -479,19 +479,7 @@ sub _Show {
sort keys %Actions;
}

my $ACL = $TicketObject->TicketAcl(
Data => \%PossibleActions,
Action => $Self->{Action},
TicketID => $Article{TicketID},
ReturnType => 'Action',
ReturnSubType => '-',
UserID => $Self->{UserID},
);

my %AclAction = %PossibleActions;
if ($ACL) {
%AclAction = $TicketObject->TicketAclActionData();
}

# get main object
my $MainObject = $Kernel::OM->Get('Kernel::System::Main');
Expand All @@ -500,6 +488,22 @@ sub _Show {
my @ActionItems;
if ( ref $ConfigObject->Get('Ticket::Frontend::PreMenuModule') eq 'HASH' ) {
my %Menus = %{ $ConfigObject->Get('Ticket::Frontend::PreMenuModule') };

if (%Menus) {
my $ACL = $TicketObject->TicketAcl(
Data => \%PossibleActions,
Action => $Self->{Action},
TicketID => $Article{TicketID},
ReturnType => 'Action',
ReturnSubType => '-',
UserID => $Self->{UserID},
);

if ($ACL) {
%AclAction = $TicketObject->TicketAclActionData();
}
}

MENU:
for my $Menu ( sort keys %Menus ) {

Expand Down Expand Up @@ -676,78 +680,6 @@ sub _Show {
}
}

# create output
$LayoutObject->Block(
Name => 'AgentAnswer',
Data => {
%Param,
%Article,
%AclAction,
},
);

if (
$ConfigObject->Get('Frontend::Module')->{AgentTicketCompose}
&& ( !defined $AclAction{AgentTicketCompose} || $AclAction{AgentTicketCompose} )
)
{
my $Access = 1;
my $Config = $ConfigObject->Get("Ticket::Frontend::AgentTicketCompose");
if ( $Config->{Permission} ) {
my $Ok = $TicketObject->TicketPermission(
Type => $Config->{Permission},
TicketID => $Param{TicketID},
UserID => $Self->{UserID},
LogNo => 1,
);
if ( !$Ok ) {
$Access = 0;
}
if ($Access) {
$LayoutObject->Block(
Name => 'AgentAnswerCompose',
Data => {
%Param,
%Article,
%AclAction,
},
);
}
}
}
if (
$ConfigObject->Get('Frontend::Module')->{AgentTicketPhoneOutbound}
&& (
!defined $AclAction{AgentTicketPhoneOutbound}
|| $AclAction{AgentTicketPhoneOutbound}
)
)
{
my $Access = 1;
my $Config = $ConfigObject->Get("Ticket::Frontend::AgentTicketPhoneOutbound");
if ( $Config->{Permission} ) {
my $OK = $TicketObject->TicketPermission(
Type => $Config->{Permission},
TicketID => $Param{TicketID},
UserID => $Self->{UserID},
LogNo => 1,
);
if ( !$OK ) {
$Access = 0;
}
}
if ($Access) {
$LayoutObject->Block(
Name => 'AgentAnswerPhoneOutbound',
Data => {
%Param,
%Article,
%AclAction,
},
);
}
}

# ticket type
if ( $ConfigObject->Get('Ticket::Type') ) {
$LayoutObject->Block(
Expand Down Expand Up @@ -1064,7 +996,6 @@ sub _Show {
Data => {
%Param,
%Article,
%AclAction,
},
);

Expand Down
110 changes: 17 additions & 93 deletions Kernel/Output/HTML/TicketOverview/Preview.pm
Original file line number Diff line number Diff line change
Expand Up @@ -513,19 +513,7 @@ sub _Show {
sort keys %Actions;
}

my $ACL = $TicketObject->TicketAcl(
Data => \%PossibleActions,
Action => $Self->{Action},
TicketID => $Article{TicketID},
ReturnType => 'Action',
ReturnSubType => '-',
UserID => $Self->{UserID},
);

my %AclAction = %PossibleActions;
if ($ACL) {
%AclAction = $TicketObject->TicketAclActionData();
}

# get main object
my $MainObject = $Kernel::OM->Get('Kernel::System::Main');
Expand All @@ -534,6 +522,22 @@ sub _Show {
my @ActionItems;
if ( ref $ConfigObject->Get('Ticket::Frontend::PreMenuModule') eq 'HASH' ) {
my %Menus = %{ $ConfigObject->Get('Ticket::Frontend::PreMenuModule') };

if (%Menus) {
my $ACL = $TicketObject->TicketAcl(
Data => \%PossibleActions,
Action => $Self->{Action},
TicketID => $Article{TicketID},
ReturnType => 'Action',
ReturnSubType => '-',
UserID => $Self->{UserID},
);

if ($ACL) {
%AclAction = $TicketObject->TicketAclActionData();
}
}

MENU:
for my $Menu ( sort keys %Menus ) {

Expand Down Expand Up @@ -769,77 +773,6 @@ sub _Show {
}
}

# create output
$LayoutObject->Block(
Name => 'AgentAnswer',
Data => {
%Param,
%Article,
%AclAction,
},
);
if (
$ConfigObject->Get('Frontend::Module')->{AgentTicketCompose}
&& ( !defined $AclAction{AgentTicketCompose} || $AclAction{AgentTicketCompose} )
)
{
my $Access = 1;
my $Config = $ConfigObject->Get('Ticket::Frontend::AgentTicketCompose');
if ( $Config->{Permission} ) {
my $Ok = $TicketObject->Permission(
Type => $Config->{Permission},
TicketID => $Param{TicketID},
UserID => $Self->{UserID},
LogNo => 1,
);
if ( !$Ok ) {
$Access = 0;
}
if ($Access) {
$LayoutObject->Block(
Name => 'AgentAnswerCompose',
Data => {
%Param,
%Article,
%AclAction,
},
);
}
}
}
if (
$ConfigObject->Get('Frontend::Module')->{AgentTicketPhoneOutbound}
&& (
!defined $AclAction{AgentTicketPhoneOutbound}
|| $AclAction{AgentTicketPhoneOutbound}
)
)
{
my $Access = 1;
my $Config = $ConfigObject->Get('Ticket::Frontend::AgentTicketPhoneOutbound');
if ( $Config->{Permission} ) {
my $OK = $TicketObject->Permission(
Type => $Config->{Permission},
TicketID => $Param{TicketID},
UserID => $Self->{UserID},
LogNo => 1,
);
if ( !$OK ) {
$Access = 0;
}
}
if ($Access) {
$LayoutObject->Block(
Name => 'AgentAnswerPhoneOutbound',
Data => {
%Param,
%Article,
%AclAction,
},
);
}
}

# ticket type
if ( $ConfigObject->Get('Ticket::Type') ) {
$LayoutObject->Block(
Expand Down Expand Up @@ -1191,7 +1124,6 @@ sub _Show {
Data => {
%Param,
%Article,
%AclAction,
},
);
}
Expand Down Expand Up @@ -1259,14 +1191,7 @@ sub _Show {
);

# check if compose link should be shown
if (
$ConfigObject->Get('Frontend::Module')->{AgentTicketCompose}
&& (
!defined $AclAction{AgentTicketCompose}
|| $AclAction{AgentTicketCompose}
)
)
{
if ( $ConfigObject->Get('Frontend::Module')->{AgentTicketCompose} ) {
my $Access = 1;
my $Config = $ConfigObject->Get('Ticket::Frontend::AgentTicketCompose');
if ( $Config->{Permission} ) {
Expand Down Expand Up @@ -1319,7 +1244,6 @@ sub _Show {
Data => {
%Param,
%Article,
%AclAction,
},
);
return \$Output;
Expand Down
26 changes: 15 additions & 11 deletions Kernel/Output/HTML/TicketOverview/Small.pm
Original file line number Diff line number Diff line change
Expand Up @@ -542,23 +542,27 @@ sub Run {
sort keys %Actions;
}

my $ACL = $TicketObject->TicketAcl(
Data => \%PossibleActions,
Action => $Self->{Action},
TicketID => $Article{TicketID},
ReturnType => 'Action',
ReturnSubType => '-',
UserID => $Self->{UserID},
);
my %AclAction = %PossibleActions;
if ($ACL) {
%AclAction = $TicketObject->TicketAclActionData();
}

# run ticket pre menu modules
my @ActionItems;
if ( ref $ConfigObject->Get('Ticket::Frontend::PreMenuModule') eq 'HASH' ) {
my %Menus = %{ $ConfigObject->Get('Ticket::Frontend::PreMenuModule') };

if (%Menus) {
my $ACL = $TicketObject->TicketAcl(
Data => \%PossibleActions,
Action => $Self->{Action},
TicketID => $Article{TicketID},
ReturnType => 'Action',
ReturnSubType => '-',
UserID => $Self->{UserID},
);
if ($ACL) {
%AclAction = $TicketObject->TicketAclActionData();
}
}

my @Items;
MENU:
for my $Menu ( sort keys %Menus ) {
Expand Down
5 changes: 3 additions & 2 deletions Kernel/System/Calendar/Plugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,13 @@ sub PluginFunction {
}

my $PluginObject = $Self->{Plugins}->{ $Param{PluginKey} }->{Object};
my $PluginModule = $Self->{Plugins}->{ $Param{PluginKey} }->{Module};
my $PluginFunction = $Param{PluginFunction};

if ( $MainObject->Require( $PluginObject, Silent => 1 ) ) {
if ( !$MainObject->Require( $PluginModule, Silent => 1 ) ) {
$LogObject->Log(
Priority => 'error',
Message => "Sorry, can't load $PluginObject!",
Message => "Sorry, can't load $PluginModule!",
);
return;
}
Expand Down
5 changes: 4 additions & 1 deletion Kernel/System/Crypt/SMIME.pm
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,10 @@ sub KeysList {
my $DBObject = $Kernel::OM->Get('Kernel::System::DB');

return if !$DBObject->Prepare(
SQL => "SELECT * FROM smime_keys",
SQL => '
SELECT id, key_hash, key_type, file_name, email_address, expiration_date, fingerprint, subject, create_time
FROM smime_keys
',
);

my @KeysList;
Expand Down
4 changes: 4 additions & 0 deletions scripts/Migration/Znuny/UpgradeDatabaseStructure.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ sub Run {
Message => 'Create missing primary keys for database tables.',
Module => 'CreatePrimaryKeys',
},
{
Message => 'Increase size of columns of database table search_profile',
Module => 'SearchProfile',
},
);

return 1 if !@Tasks;
Expand Down
Loading

0 comments on commit 49266bd

Please sign in to comment.