4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
10 +--------------------------------------------------------------------+
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
22 * (Read-only) Available permissions
24 * NOTE: This is a high-level API intended for introspective use by administrative tools.
25 * It may be poorly suited to recursive usage (e.g. permissions defined dynamically
26 * on top of permissions!) or during install/uninstall processes.
31 class Permission
extends Generic\AbstractEntity
{
34 * @param bool $checkPermissions
35 * @return Action\Permission\Get
37 public static function get($checkPermissions = TRUE) {
38 return (new Action\Permission\
Get(__CLASS__
, __FUNCTION__
))
39 ->setCheckPermissions($checkPermissions);
43 * @param bool $checkPermissions
44 * @return Generic\BasicGetFieldsAction
46 public static function getFields($checkPermissions = TRUE) {
47 return (new Generic\
BasicGetFieldsAction(__CLASS__
, __FUNCTION__
, function() {
52 'data_type' => 'String',
57 'data_type' => 'String',
62 'data_type' => 'String',
65 'name' => 'description',
66 'title' => 'Description',
67 'data_type' => 'String',
70 'name' => 'is_synthetic',
71 'title' => 'Is Synthetic',
72 'data_type' => 'Boolean',
75 'name' => 'is_active',
76 'title' => 'Is Active',
79 'data_type' => 'Boolean',
82 }))->setCheckPermissions($checkPermissions);
88 public static function permissions() {
90 "meta" => ["access CiviCRM"],
91 "default" => ["access CiviCRM"],