NuSkooler / enigma-bbs

ENiGMA½ BBS Software
https://nuskooler.github.io/enigma-bbs/
BSD 2-Clause "Simplified" License
537 stars 104 forks source link

Validate and enforce required MCI/views in menu modules. #165

Open NuSkooler opened 6 years ago

NuSkooler commented 6 years ago

Menu modules that require a particular set of MCI codes (e.g. VM1, SM2 ...) should validate and enforce that requirements returning a failure to load the menu vs attempting to access the view and crashing.

See #164 as an example of this.

A new error code Errors.MissingMci has been added in the 0.0.9-alpha branch to handle these cases uniformly.

NuSkooler commented 5 years ago

https://github.com/NuSkooler/enigma-bbs/blob/user-interruptions/core/menu_module.js#L561

This will be used all over the place later when it's brought into the main branch.

NuSkooler commented 5 years ago

ValidateMCIByViewIds is in and in use in a few spots. PR's welcome :)