Add a new HostEntity method isOpenForRegistration

Created on 12 February 2025, 26 days ago

Problem/Motivation

Recently a new method named isAvailableForRegistration was added to the HostEntityInterface. This method is very useful, but has one drawback in that it is sensitive to the registration count for a given host entity through its HasRoom validator, and has to do a count query on the registration table, which is relatively expensive. Thus it is not suitable for use in access control where performance is paramount.

Introducing a new method isOpenForRegistration can do all the same checks as isAvailable except the HasRoom and AllowedRegistrant checks. This new method can be used in access control and various field formatters to simplify the code.

This method might also allow the "set and forget" feature to be deprecated, since access control that automatically recalculates based on settings open and close dates may make that unnecessary.

Steps to reproduce

Proposed resolution

Add the new method and use it in access control and various field formatters where applicable.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

3.3

Component

Registration Core

Created by

πŸ‡ΊπŸ‡ΈUnited States john.oltman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024