26. The Guest pattern

An end user can only access a context that (s)he has a perspective on. Yet, sometimes users will want to acquaint themselves with the requirements that taking a role in a context brings with it, before they do so (E.g., the role may require filling with details that the user does not part with without serious consideration). We can handle that with object state: the perspectives of others may depend on the state of the role in question, so we might introduce a ‘consent’ Boolean property, for example.

Here we give another pattern, that depends on a particularity of deciding what role an end user plays in a context.


1. If no authoring role is provided by the API caller, we take it to be the System User.