PluginProbe
The Innovative Form Builder – IvyForms / 1.5
The Innovative Form Builder – IvyForms v1.5
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Common / Permissions / RestPermissions.php

RestPermissions.php in The Innovative Form Builder – IvyForms 1.5, at backend/src/Common/Permissions/RestPermissions.php

26 lines 610 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\Common\Permissions;
4
5 /**
6 * REST API permission callbacks for IvyForms admin SPA routes.
7 */
8 class RestPermissions
9 {
10 /**
11 * Admin SPA routes: manage forms, entries, settings, etc.
12 */
13 public static function canManage(): bool
14 {
15 return current_user_can('ivyforms_manage') || current_user_can('manage_options');
16 }
17
18 /**
19 * Plugin installation routes (WordPress core capabilities).
20 */
21 public static function canInstallPlugins(): bool
22 {
23 return current_user_can('install_plugins') && current_user_can('activate_plugins');
24 }
25 }
26