Allow login-as master API access to User if master has api_with_password=yes

Version 1.49

Bugfix
Finished

Relating to the api_with_password user.conf option, when using the "Login As" method to login to a User account, when accessing an API, should the User have api_with_password=no set, this fix will then query that setting for the master that is doing the "Login As" on the API command. If it's denied for the User, the master must have it enabled to be able to access the API. Previously, the master wouldn't be able to access it, regardless of their setting, when the User is set to "no". Note: this does not refer to Login Keys or Session Keys. If you're running a script to call the DA API, you really should be using a Login Key anyway, which are always allowed regardless of the api_with_password setting.

Interested to try DirectAdmin? Get a 30-day Free Trial!