HEX
Server: LiteSpeed
System: Linux premium263.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: eastcjee (525)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //proc/thread-self/cwd/wp-content/plugins/ninja-forms/includes/Abilities/PermissionCallbacks.php
<?php
/**
 * Permission Callback Functions for Ninja Forms Abilities
 *
 * This file contains all the permission callback functions for Ninja Forms abilities.
 * These functions are moved here to reduce the size of the main Abilities.php file.
 *
 * @package NinjaForms
 * @subpackage Abilities
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Check if current user can manage forms
 *
 * @return bool
 */
function ninja_forms_ability_can_manage_forms() {
	if ( current_user_can( 'manage_options' ) || current_user_can( 'nf_edit_forms' ) ) {
		return true;
	}

	return new \WP_Error(
		'rest_forbidden',
		__( 'Sorry, you are not allowed to manage Ninja Forms.', 'ninja-forms' )
	);
}