mbbsemu / MBBSEmu

The MajorBBS Emulation Project is an Open Source, Cross-Platform emulator for easily running The MajorBBS & Worldgroup Modules
https://www.mbbsemu.com
MIT License
126 stars 14 forks source link

RLogin should support auto-account creation #512

Open paladine opened 2 years ago

paladine commented 2 years ago

Upon initial Rlogin connection, if the user doesn't exist, we should support auto creating the accounts, using the default creation key set defined the config file.

It would be useful to have a config option that enables this auto-rlogin-account-creation feature, defaulting to true.

tuday2 commented 2 years ago

As part of this we could remove the checks for haskey(), haskeym() and uidkey() (in majorbbs.cs) for missing rlogin user

            //If the user isnt registered on the system, most likely RLOGIN -- so apply the default keys
            if (_accountRepository.GetAccountByUsername(userName) == null)
            {
                keys = _configuration.DefaultKeys;
            }
            else
            {
                var accountKeys = _accountKeyRepository.GetAccountKeysByUsername(userName);
                keys = accountKeys.Select(x => x.accountKey);
            }