Security-hardened implementation that automatically grants superuser status to graham@towerops.net and graham@mcintire.me during user registration. Security measures: - Only runs during NEW user creation (__meta__.state == :built check) - Cannot be triggered via account updates (prevents privilege escalation) - Case-insensitive comparison (prevents 'Graham@TOWEROPS.NET' bypass) - Email must pass validation and uniqueness constraint first - Explicit defense-in-depth with comprehensive security comments Prevents scenarios where: - Owner loses access to their own system - Need to manually grant superuser via database manipulation - Case variations could bypass the check Test coverage includes: - Both email addresses get superuser - Case variations are handled correctly - Similar/spoofed emails are rejected - Other emails don't get superuser |
||
|---|---|---|
| .. | ||
| mix/tasks | ||
| snmpkit | ||
| towerops | ||
| towerops_web | ||
| snmp_lib.ex | ||
| snmp_mgr.ex | ||
| snmpkit.ex | ||
| towerops.ex | ||
| towerops_native.ex | ||
| towerops_web.ex | ||