【发布时间】:2015-11-05 08:47:27
【问题描述】:
【问题讨论】:
【问题讨论】:
不确定您使用的是什么版本的 OrangeHRM,但我尝试使用 3.3.2,它看起来与您的图片完全不同,所以我猜代码也会有所不同。不过,一个好的起点是orangehrm/symfony/plugins/orangehrmPerformancePlugin/modules/Perfomance/actions,在这里您可能会找到searchReviewsAction.class.php 或类似于页面网址最后一部分的内容。
我在橙色中找到的最接近的代码示例是用于保存我在您的图片中看到的 KPI,您也可以这样做。所以在saveKpiAction.class.php有一个函数:
protected function _checkAuthentication($request = null) {
$user = $this->getUser()->getAttribute('user');
if (!($user->isAdmin())) {
$this->forward(sfConfig::get('sf_secure_module'),
sfConfig::get('sf_secure_action'));
}
}
你可以在这里做一些乱七八糟的事情,取消这些在 Performace 插件中弹出的检查,通常每个事情只有一个,比如添加 KPI,复制 KPI,不过这真的是 ghetto modding,如果你很了解 symfony,我就在那里是添加 ess 所拥有权限的更巧妙方法。
【讨论】: