dev/core#4704 Display 'registration is closed' only if users can register
authorMathieu Lu <mathieu@symbiotic.coop>
Fri, 20 Oct 2023 17:41:27 +0000 (13:41 -0400)
committerMathieu Lutfy <mathieu@bidon.ca>
Fri, 20 Oct 2023 17:41:27 +0000 (13:41 -0400)
CRM/Event/Page/EventInfo.php

index 871e312586f0e934a12808fc35a6a96cdd21f912..8f9d9d2e4099c4448148fcaabb4df3a85b0c0631 100644 (file)
@@ -276,8 +276,8 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page {
         }
       }
     }
-    $this->assign('registerClosed', !empty($values['event']['is_online_registration']) && !$isEventOpenForRegistration);
 
+    $this->assign('registerClosed', !empty($values['event']['is_online_registration']) && !$isEventOpenForRegistration && CRM_Core_Permission::check('register for events'));
     $this->assign('allowRegistration', $allowRegistration);
 
     $session = CRM_Core_Session::singleton();