Open Cm-8 opened 3 weeks ago
on line 19, instead of:
if (!$thisstaff || !$thisstaff->isAdmin())
return;
if ($ost) {
$ost->addExtraHeader(ExtraFrontendResourcesPlugin::$frontendResources);
}
Isn't it better:
if ($thisstaff && $thisstaff->isStaff() || $thisstaff->isAdmin()) {
if ($ost) {
$ost->addExtraHeader(ExtraFrontendResourcesPlugin::$frontendResources);
}
} else
return;
Thank you for your feedback.
I've made a request to the osTicket development team about this app:
I would like to divide front-end development into the following categories:
Reference: https://github.com/osTicket/osTicket/pull/6735/commits/db3337d6e3af90f70b84257dc8babe6449fd2da4
Therefore, it can achieve the goal of providing services only to administrators, such as services through paid APIs.
If you are still interested in this feature, please add some comments to these requests to let the development team know about these needs, thank you
on line 19, instead of:
if (!$thisstaff || !$thisstaff->isAdmin()) return; if ($ost) { $ost->addExtraHeader(ExtraFrontendResourcesPlugin::$frontendResources); }
Isn't it better:
if ($thisstaff && $thisstaff->isStaff() || $thisstaff->isAdmin()) { if ($ost) { $ost->addExtraHeader(ExtraFrontendResourcesPlugin::$frontendResources); } } else return;
Does this meet your requirements?
if (!$thisstaff || !$thisstaff->isActive())
return;
if ($ost) {
$ost->addExtraHeader(ExtraFrontendResourcesPlugin::$frontendResources);
}
Your modification and mine both work fine, now the code is added for both the administrator agent and the basic agent and not for the user who logs in.
In my case your plugin is useful for adding IA scripts to OsTicket, I don't need the custom header for the customer area but I'll try to follow up anyway.
Hi,
I tried your plugin and I have to thank you for the great work you did. It was very useful for me.
However, I noticed that adding the code for the staff only works if the agent is an admin, it does not work if the agent is a normal operator (not admin).
Do you understand this or am I doing something wrong?
Obviously I would not like to provide administrator privileges to all agents who answer tickets.
Thanks