diff --git a/Kernel/Modules/AdminCustomerGroup.pm b/Kernel/Modules/AdminCustomerGroup.pm index 8235a1411b..f0ddd2c3dc 100644 --- a/Kernel/Modules/AdminCustomerGroup.pm +++ b/Kernel/Modules/AdminCustomerGroup.pm @@ -24,6 +24,11 @@ sub new { my $Self = {%Param}; bless( $Self, $Type ); + $Self->{AdminSystemConfigurationPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminSystemConfiguration', + Type => 'rw', + ); + return $Self; } @@ -33,6 +38,8 @@ sub Run { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); my $ConfigObject = $Kernel::OM->Get('Kernel::Config'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + # ------------------------------------------------------------ # # check if feature is active # ------------------------------------------------------------ # @@ -371,6 +378,8 @@ sub _Change { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); my $ConfigObject = $Kernel::OM->Get('Kernel::Config'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + my %Data = %{ $Param{Data} }; my $Type = $Param{Type} || 'Customer'; my $NeType = $Type eq 'Group' ? 'Customer' : 'Group'; @@ -430,7 +439,12 @@ sub _Change { else { # output config shortcut to CustomerAlwaysGroups - $LayoutObject->Block( Name => 'AlwaysGroupsConfig' ); + $LayoutObject->Block( + Name => 'AlwaysGroupsConfig', + Data => { + %Param, + }, + ); $LayoutObject->Block( Name => 'Filter' ); } @@ -606,6 +620,8 @@ sub _Overview { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); my $ConfigObject = $Kernel::OM->Get('Kernel::Config'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + my $CustomerCount = $Param{CustomerCount}; my @CustomerKeyList = @{ $Param{CustomerKeyList} }; my %CustomerData = %{ $Param{CustomerData} }; @@ -628,7 +644,12 @@ sub _Overview { ); # Output config shutcut to CustomerAlwaysGroups - $LayoutObject->Block( Name => 'AlwaysGroupsConfig' ); + $LayoutObject->Block( + Name => 'AlwaysGroupsConfig', + Data => { + %Param, + }, + ); # output filter and default block $LayoutObject->Block( @@ -744,6 +765,8 @@ sub _Disabled { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + $LayoutObject->Block( Name => 'Overview', Data => { diff --git a/Kernel/Modules/AdminCustomerUserGroup.pm b/Kernel/Modules/AdminCustomerUserGroup.pm index c1e6d81f7c..6c483042e3 100644 --- a/Kernel/Modules/AdminCustomerUserGroup.pm +++ b/Kernel/Modules/AdminCustomerUserGroup.pm @@ -23,6 +23,11 @@ sub new { my $Self = {%Param}; bless( $Self, $Type ); + $Self->{AdminSystemConfigurationPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminSystemConfiguration', + Type => 'rw', + ); + return $Self; } @@ -32,6 +37,8 @@ sub Run { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); my $ConfigObject = $Kernel::OM->Get('Kernel::Config'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + # ------------------------------------------------------------ # # check if feature is active # ------------------------------------------------------------ # @@ -347,6 +354,8 @@ sub _Change { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); my $ConfigObject = $Kernel::OM->Get('Kernel::Config'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + my %Data = %{ $Param{Data} }; my $Type = $Param{Type} || 'CustomerUser'; my $NeType = $Type eq 'Group' ? 'CustomerUser' : 'Group'; @@ -404,7 +413,12 @@ sub _Change { else { # output config shortcut to CustomerAlwaysGroups - $LayoutObject->Block( Name => 'AlwaysGroupsConfig' ); + $LayoutObject->Block( + Name => 'AlwaysGroupsConfig', + Data => { + %Param, + }, + ); $LayoutObject->Block( Name => 'Filter' ); } @@ -555,6 +569,8 @@ sub _Overview { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); my $ConfigObject = $Kernel::OM->Get('Kernel::Config'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + my $CustomerUserCount = $Param{CustomerUserCount}; my @CustomerUserKeyList = @{ $Param{CustomerUserKeyList} }; my %CustomerUserData = %{ $Param{CustomerUserData} }; @@ -579,7 +595,12 @@ sub _Overview { ); # Output config shutcut to CustomerAlwaysGroups - $LayoutObject->Block( Name => 'AlwaysGroupsConfig' ); + $LayoutObject->Block( + Name => 'AlwaysGroupsConfig', + Data => { + %Param, + }, + ); # output filter and default block $LayoutObject->Block( @@ -695,6 +716,8 @@ sub _Disabled { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + $LayoutObject->Block( Name => 'Overview', Data => { diff --git a/Kernel/Modules/AdminMailAccount.pm b/Kernel/Modules/AdminMailAccount.pm index d8a5ee6772..1a345d2002 100644 --- a/Kernel/Modules/AdminMailAccount.pm +++ b/Kernel/Modules/AdminMailAccount.pm @@ -23,6 +23,11 @@ sub new { my $Self = {%Param}; bless( $Self, $Type ); + $Self->{AdminSystemConfigurationPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminSystemConfiguration', + Type => 'rw', + ); + return $Self; } @@ -33,6 +38,8 @@ sub Run { my $ParamObject = $Kernel::OM->Get('Kernel::System::Web::Request'); my $MailAccountObject = $Kernel::OM->Get('Kernel::System::MailAccount'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + my %GetParam = (); my @Params = ( qw( @@ -368,6 +375,8 @@ sub _Overview { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); my $MailAccountObject = $Kernel::OM->Get('Kernel::System::MailAccount'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + my %Backend = $MailAccountObject->MailAccountBackendList(); $LayoutObject->Block( @@ -425,6 +434,8 @@ sub _MaskUpdateMailAccount { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + # get valid list my %ValidList = $Kernel::OM->Get('Kernel::System::Valid')->ValidList(); my %ValidListReverse = reverse %ValidList; @@ -504,6 +515,8 @@ sub _MaskAddMailAccount { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + # get valid list my %ValidList = $Kernel::OM->Get('Kernel::System::Valid')->ValidList(); my %ValidListReverse = reverse %ValidList; diff --git a/Kernel/Modules/AdminPriority.pm b/Kernel/Modules/AdminPriority.pm index 9df827d2f0..ff398edcb5 100644 --- a/Kernel/Modules/AdminPriority.pm +++ b/Kernel/Modules/AdminPriority.pm @@ -24,6 +24,11 @@ sub new { my $Self = {%Param}; bless( $Self, $Type ); + $Self->{AdminSystemConfigurationPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminSystemConfiguration', + Type => 'rw', + ); + return $Self; } @@ -41,6 +46,8 @@ sub Run { my $ParamObject = $Kernel::OM->Get('Kernel::System::Web::Request'); my $PriorityObject = $Kernel::OM->Get('Kernel::System::Priority'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + # ------------------------------------------------------------ # # change # ------------------------------------------------------------ # @@ -308,6 +315,8 @@ sub _Edit { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + $LayoutObject->Block( Name => 'Overview', Data => \%Param, @@ -404,6 +413,8 @@ sub _Overview { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + $LayoutObject->Block( Name => 'Overview', Data => \%Param, diff --git a/Kernel/Modules/AdminProcessManagement.pm b/Kernel/Modules/AdminProcessManagement.pm index 778d4d9916..436248a5b2 100644 --- a/Kernel/Modules/AdminProcessManagement.pm +++ b/Kernel/Modules/AdminProcessManagement.pm @@ -25,6 +25,16 @@ sub new { my $Self = {%Param}; bless( $Self, $Type ); + $Self->{AdminACLPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminACL', + Type => 'rw', + ); + + $Self->{AdminSystemConfigurationPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminSystemConfiguration', + Type => 'rw', + ); + return $Self; } @@ -69,6 +79,9 @@ sub Run { my $StateObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::DB::Process::State'); my $ConfigObject = $Kernel::OM->Get('Kernel::Config'); + $Param{AdminACLPermission} = $Self->{AdminACLPermission}; + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + # ------------------------------------------------------------ # # ProcessImport # ------------------------------------------------------------ # @@ -1600,6 +1613,9 @@ sub _ShowOverview { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminACLPermission} = $Self->{AdminACLPermission}; + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + my $Output = $LayoutObject->Header(); $Output .= $LayoutObject->NavigationBar(); diff --git a/Kernel/Modules/AdminQueue.pm b/Kernel/Modules/AdminQueue.pm index 3e30506630..8941373899 100644 --- a/Kernel/Modules/AdminQueue.pm +++ b/Kernel/Modules/AdminQueue.pm @@ -25,6 +25,16 @@ sub new { my $Self = {%Param}; bless( $Self, $Type ); + $Self->{AdminMailAccountPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminMailAccount', + Type => 'rw', + ); + + $Self->{AdminSystemConfigurationPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminSystemConfiguration', + Type => 'rw', + ); + return $Self; } @@ -111,6 +121,9 @@ sub Run { my $MainObject = $Kernel::OM->Get('Kernel::System::Main'); my $Notification = $ParamObject->GetParam( Param => 'Notification' ) || ''; + $Param{AdminMailAccountPermission} = $Self->{AdminMailAccountPermission}; + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + # ------------------------------------------------------------ # # change # ------------------------------------------------------------ # @@ -577,6 +590,9 @@ sub _Edit { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminMailAccountPermission} = $Self->{AdminMailAccountPermission}; + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + $LayoutObject->Block( Name => 'Overview', Data => \%Param, @@ -949,6 +965,9 @@ sub _Overview { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminMailAccountPermission} = $Self->{AdminMailAccountPermission}; + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + $LayoutObject->Block( Name => 'Overview', Data => \%Param, diff --git a/Kernel/Modules/AdminSLA.pm b/Kernel/Modules/AdminSLA.pm index f4627dd56e..49e61a0616 100644 --- a/Kernel/Modules/AdminSLA.pm +++ b/Kernel/Modules/AdminSLA.pm @@ -23,6 +23,11 @@ sub new { $Self->{IsITSMInstalled} = $Kernel::OM->Get('Kernel::System::Util')->IsITSMInstalled(); + $Self->{AdminSystemConfigurationPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminSystemConfiguration', + Type => 'rw', + ); + return $Self; } @@ -35,7 +40,8 @@ sub Run { my $SLAObject = $Kernel::OM->Get('Kernel::System::SLA'); my %Error = (); - $Param{IsITSMInstalled} = $Self->{IsITSMInstalled}; + $Param{IsITSMInstalled} = $Self->{IsITSMInstalled}; + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; # ------------------------------------------------------------ # # sla edit @@ -338,7 +344,8 @@ sub _MaskNew { my $ParamObject = $Kernel::OM->Get('Kernel::System::Web::Request'); - $Param{IsITSMInstalled} = $Self->{IsITSMInstalled}; + $Param{IsITSMInstalled} = $Self->{IsITSMInstalled}; + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; # get params my %SLAData; diff --git a/Kernel/Modules/AdminService.pm b/Kernel/Modules/AdminService.pm index de159c93d8..d54fe9b54c 100644 --- a/Kernel/Modules/AdminService.pm +++ b/Kernel/Modules/AdminService.pm @@ -25,6 +25,11 @@ sub new { $Self->{IsITSMInstalled} = $Kernel::OM->Get('Kernel::System::Util')->IsITSMInstalled(); + $Self->{AdminSystemConfigurationPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminSystemConfiguration', + Type => 'rw', + ); + return $Self; } @@ -35,7 +40,8 @@ sub Run { my $ConfigObject = $Kernel::OM->Get('Kernel::Config'); my $ServiceObject = $Kernel::OM->Get('Kernel::System::Service'); - $Param{IsITSMInstalled} = $Self->{IsITSMInstalled}; + $Param{IsITSMInstalled} = $Self->{IsITSMInstalled}; + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; if ( $Self->{IsITSMInstalled} ) { my $DynamicFieldObject = $Kernel::OM->Get('Kernel::System::DynamicField'); @@ -335,7 +341,8 @@ sub _MaskNew { my $ServiceObject = $Kernel::OM->Get('Kernel::System::Service'); my %ServiceData; - $Param{IsITSMInstalled} = $Self->{IsITSMInstalled}; + $Param{IsITSMInstalled} = $Self->{IsITSMInstalled}; + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; # get params $ServiceData{ServiceID} = $Kernel::OM->Get('Kernel::System::Web::Request')->GetParam( Param => "ServiceID" ); diff --git a/Kernel/Modules/AdminState.pm b/Kernel/Modules/AdminState.pm index 3d63340e85..64c3ba1324 100644 --- a/Kernel/Modules/AdminState.pm +++ b/Kernel/Modules/AdminState.pm @@ -24,6 +24,11 @@ sub new { my $Self = {%Param}; bless( $Self, $Type ); + $Self->{AdminSystemConfigurationPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminSystemConfiguration', + Type => 'rw', + ); + return $Self; } @@ -41,6 +46,8 @@ sub Run { my $ParamObject = $Kernel::OM->Get('Kernel::System::Web::Request'); my $StateObject = $Kernel::OM->Get('Kernel::System::State'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + # ------------------------------------------------------------ # # change # ------------------------------------------------------------ # @@ -327,6 +334,8 @@ sub _Edit { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); my $StateObject = $Kernel::OM->Get('Kernel::System::State'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + $LayoutObject->Block( Name => 'Overview', Data => \%Param, @@ -426,6 +435,8 @@ sub _Overview { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + $LayoutObject->Block( Name => 'Overview', Data => \%Param, diff --git a/Kernel/Modules/AdminType.pm b/Kernel/Modules/AdminType.pm index 1e48b161c0..ec750fff1d 100644 --- a/Kernel/Modules/AdminType.pm +++ b/Kernel/Modules/AdminType.pm @@ -23,6 +23,11 @@ sub new { my $Self = {%Param}; bless( $Self, $Type ); + $Self->{AdminSystemConfigurationPermission} = $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Permission( + Action => 'AdminSystemConfiguration', + Type => 'rw', + ); + return $Self; } @@ -52,6 +57,8 @@ sub Run { ); } + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + # ------------------------------------------------------------ # # change # ------------------------------------------------------------ # @@ -358,6 +365,8 @@ sub _Edit { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + $LayoutObject->Block( Name => 'Overview', Data => \%Param, @@ -458,6 +467,8 @@ sub _Overview { my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); + $Param{AdminSystemConfigurationPermission} = $Self->{AdminSystemConfigurationPermission}; + $LayoutObject->Block( Name => 'Overview', Data => \%Param, diff --git a/Kernel/Output/HTML/Templates/Standard/AdminCustomerGroup.tt b/Kernel/Output/HTML/Templates/Standard/AdminCustomerGroup.tt index cca6bb5269..3acc146611 100644 --- a/Kernel/Output/HTML/Templates/Standard/AdminCustomerGroup.tt +++ b/Kernel/Output/HTML/Templates/Standard/AdminCustomerGroup.tt @@ -90,6 +90,7 @@ [% RenderBlockEnd("Search") %] [% RenderBlockStart("AlwaysGroupsConfig") %] + [% IF Data.AdminSystemConfigurationPermission %]
@@ -97,6 +98,7 @@ [% Translate("You can manage these groups via the configuration setting \"CustomerGroupCompanyAlwaysGroups\".") | html %]
@@ -98,6 +99,7 @@ [% Translate("You can manage these groups via the configuration setting \"CustomerGroupAlwaysGroups\".") | html %]
+ [% IF Data.AdminSystemConfigurationPermission %] [% Translate("Outgoing email can be configured via the Sendmail* settings in %s.", '' _ Translate("System Configuration") _ '') %] + [% ELSE %] + [% Translate("Outgoing email can be configured via the Sendmail* settings in %s.", + Translate("System Configuration")) %] + [% END %]