Skip to content

Commit

Permalink
Merge pull request #41 from backdrop-contrib/issue-40
Browse files Browse the repository at this point in the history
#40: Autocomplete and roles
  • Loading branch information
jackaponte authored Oct 24, 2019
2 parents 1192116 + f425964 commit 2dcce0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/wf_crm_webform_ajax.inc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class wf_crm_webform_ajax extends wf_crm_webform_base {
if (config_get('webform.settings', 'webform_submission_access_control') == 1) {
$allowed_roles = array();
foreach ($node->webform['roles'] as $rid) {
$allowed_roles[$rid] = isset($user->roles[$rid]) ? TRUE : FALSE;
$allowed_roles[$rid] = in_array($rid, $user->roles) ? TRUE : FALSE;
}
if (array_search(TRUE, $allowed_roles) === FALSE) {
return FALSE;
Expand Down

0 comments on commit 2dcce0f

Please sign in to comment.