3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
14 * (Read-only) Available permissions
16 * NOTE: This is a high-level API intended for introspective use by administrative tools.
17 * It may be poorly suited to recursive usage (e.g. permissions defined dynamically
18 * on top of permissions!) or during install/uninstall processes.
24 class Permission
extends Generic\AbstractEntity
{
27 * @param bool $checkPermissions
28 * @return Action\Permission\Get
30 public static function get($checkPermissions = TRUE) {
31 return (new Action\Permission\
Get(__CLASS__
, __FUNCTION__
))
32 ->setCheckPermissions($checkPermissions);
36 * @param bool $checkPermissions
37 * @return Generic\BasicGetFieldsAction
39 public static function getFields($checkPermissions = TRUE) {
40 return (new Generic\
BasicGetFieldsAction(__CLASS__
, __FUNCTION__
, function() {
45 'data_type' => 'String',
47 'civicrm' => 'civicrm',
51 'afformGeneric' => 'afformGeneric',
52 'unknown' => 'unknown',
58 'data_type' => 'String',
63 'data_type' => 'String',
66 'name' => 'description',
67 'title' => 'Description',
68 'data_type' => 'String',
71 'name' => 'is_synthetic',
72 'title' => 'Is Synthetic',
73 'data_type' => 'Boolean',
76 'name' => 'is_active',
77 'title' => 'Is Active',
80 'data_type' => 'Boolean',
83 }))->setCheckPermissions($checkPermissions);
89 public static function permissions() {
91 "meta" => ["access CiviCRM"],
92 "default" => ["access CiviCRM"],