• Serena Fang's avatar
    Prevent user from changing email to non allowlist · b0f1874f
    Serena Fang authored
    Currently, a user can bypass the domain allowlist
    by creating an account with an email that is on the list,
    then changing their email to a domain that is not
    on the list.
    
    Changelog: fixed
    
    Fix conditional order
    
    Remove accidental changes
    
    Fix failing specs
    
    Remove bad spec
    
    Allow admin to add user not on allowlist
    
    Validate if not new record
    
    Remove unnecessary spec changes
    
    Validate domain update
    
    Use existing methods in restricted signup concern
    to validate domain update
    
    Add specs for deny and restricted
    
    Add specs for updating domain
    to denied or restricted domain
    
    Undo unintentional changes
    
    Remove unneeded spec
    
    Fix bad spec
    
    Reuse signup restrictions method
    
    Change method name back
    
    Was breaking other specs
    
    Check if not new record
    b0f1874f
user_spec.rb 210 KB