projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c85dbf4
)
Afform.prefill - Allow anonymous requests
author
Tim Otten
<totten@civicrm.org>
Thu, 4 Feb 2021 03:46:12 +0000
(19:46 -0800)
committer
Tim Otten
<totten@civicrm.org>
Thu, 4 Feb 2021 04:15:13 +0000
(20:15 -0800)
This API has its own security checks
ext/afform/core/afform.php
patch
|
blob
|
blame
|
history
diff --git
a/ext/afform/core/afform.php
b/ext/afform/core/afform.php
index 54fe6e8c6eae32901ff6ef868af1afcc5d31175a..87c4e243375693b7f8668fc5649d98e9a167674e 100644
(file)
--- a/
ext/afform/core/afform.php
+++ b/
ext/afform/core/afform.php
@@
-394,7
+394,9
@@
function _afform_angular_module_name($fileBaseName, $format = 'camel') {
* @see CRM_Utils_Hook::alterApiRoutePermissions
*/
function afform_civicrm_alterApiRoutePermissions(&$permissions, $entity, $action) {
- if ($entity == 'Afform' && $action == 'submit') {
- $permissions = CRM_Core_Permission::ALWAYS_ALLOW_PERMISSION;
+ if ($entity == 'Afform') {
+ if ($action == 'prefill' || $action == 'submit') {
+ $permissions = CRM_Core_Permission::ALWAYS_ALLOW_PERMISSION;
+ }
}
}