Skip to content
Snippets Groups Projects
Commit 5570e1d6 authored by Igor Biki's avatar Igor Biki
Browse files

ISTWCMS-5863: Using provided user account instead of current user. Comment update.

parent f6464467
No related branches found
No related tags found
3 merge requests!281ISTWCMS-5863 Authenticated webforms should properly enforce individual user access,!274Draft: ISTWCMS-5551: fixing office hours display,!260Feature/istwcms 5668 a5kulkar rename references to publications
......@@ -1033,11 +1033,8 @@ function uw_cfg_common_webform_access(WebformInterface $webform, string $operati
// admin/structure/webform/manage/WEBFORM_ID/access.
$create_user_ids = $webform->getAccessRules()['create']['users'];
// Get current logged in user id.
$current_user_id = \Drupal::currentUser()->id();
// If the logged user is in not a specified user, get access denied.
if (!in_array($current_user_id, $create_user_ids)) {
// If the logged in user is not a specified user, get access denied.
if (!in_array($account->id(), $create_user_ids)) {
return AccessResult::forbidden();
}
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment