Added permission for page

This commit is contained in:
CiviWare Solutions 2018-08-12 00:10:06 +05:30
parent 04a78b6e3b
commit 8d7149bc2f

View File

@ -26,6 +26,15 @@ class CRM_Grant_Page_AnnualBudgets extends CRM_Core_Page_Basic {
* Browse all Grant Budget.
*/
public function browse() {
//check permission
if (!(CRM_Core_Permission::check('administer CiviCRM')
|| ( CRM_Core_Permission::check('access CiviGrant')
&& CRM_Core_Permission::check('edit grants')
)
)) {
return CRM_Utils_System::permissionDenied();
}
$fiscalYear = CRM_Utils_Request::retrieve('fiscalYears', 'Positive');
if (empty($fiscalYear)) {
$fiscalYear = date('Y');