Kernel::System::ITSMConfigItem::Permission::ItemClassGroupCheck - check if a user can access an item
All config item functions.
new()
create an object
use Kernel::Config;
use Kernel::System::Encode;
use Kernel::System::Log;
use Kernel::System::DB;
use Kernel::System::Main;
use Kernel::System::GeneralCatalog;
use Kernel::System::ITSMConfigItem;
use Kernel::System::ITSMConfigItem::Permission::ItemClassGroupCheck;
my $ConfigObject = Kernel::Config->new();
my $EncodeObject = Kernel::System::Encode->new(
ConfigObject => $ConfigObject,
);
my $LogObject = Kernel::System::Log->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
);
my $MainObject = Kernel::System::Main->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
);
my $DBObject = Kernel::System::DB->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
MainObject => $MainObject,
);
my $ConfigItemObject = Kernel::System::ITSMConfigItem->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
DBObject => $DBObject,
MainObject => $MainObject,
);
my $GeneralCatalogObject = Kernel::System::GeneralCatalog->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
DBObject => $DBObject,
MainObject => $MainObject,
);
my $CheckObject = Kernel::System::ITSMConfigItem::Permission::ItemClassGroupCheck->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
DBObject => $DBObject,
MainObject => $MainObject,
ConfigItemObject => $ConfigItemObject,
GeneralCatalogObject => $GeneralCatalogObject,
);
Run()
this method does the check if the user can access an item
my $HasAccess = $CheckObject->Run(
UserID => 123,
Type => 'ro',
ItemID => 345,
);
This Software is part of the OTRS project (http://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.