Notify if login-as account is not using a global skin (SKINS)(LANG)(SECURITY)

Version 1.53


Sometimes you might not want to login to an a User or Reseller account, using a skin a Reseller or other Admin have uploaded. This feature will add a notice if the skin isn't global, shown on CMD_SHOW_RESELLER and CMD_SHOW_USER pages below the "Login As" button. You can also set it such that if you do decide to login anyway, it will override and use a global skin. Internal default is: allow_admin_login_as_to_reseller_skin=1 which gives a notice, but allows the login using the Reseller skin in /home/reseller/skins/skinname If you want to only ever login-as with global skins, set it to 0 by adding it to the directadmin.conf, and restarting DA: allow_admin_login_as_to_reseller_skin=0 Note, you can fully disable the feature by setting it to 2: allow_admin_login_as_to_reseller_skin=2 Where no notices are added, and full login is still allowed using the Reseller skin. If DA has trouble figuring out if a docsroot is global, or who it belongs to, you'll get an error in the: /var/log/directadmin/error.log starting with: Command::check_login_as_reseller_skin and the error following after that on the same line. =================== SKINS admin/show_reseller.html reseller/show_user.html added |HTM_LOGIN_AS_WARNINGS| ---- files_reseller.conf added this, but you can use some other file, or directly insert the code into the 2 above show_*.html pages, however you want: HTM_LOGIN_AS_WARNINGS=reseller/login_as_warnings.html ---- new file: reseller/login_as_warnings.html =================== LANG lang/en/reseller/login_as_warnings.html which make use of the tokens below, so should only be called via the 2 commands below. =================== TOKENS: CMD_SHOW_RESELLER CMD_SHOW_USER IS_RESELLER_SKIN=-# (same as json below) if IS_RESELLER_SKIN==-1 then IS_RESELLER_SKIN_ERROR is set. --- if IS_RESELLER_SKIN==1|2 then RESELLER_SKIN_OWNER is set. use_current_skin=yes will be passed in the form, so the session stores a skin path override. --- IS_RESELLER_SKIN_ERROR: string starting with "error: " containing an error message why DA couldn't figure out the owner of the skin. RESELLER_SKIN_OWNER: the owner of the skin, only set if 1 or 2 above =================== JSON CMD_SHOW_RESELLER?user=resellername&json=yes adds: is_reseller_skin=0 - it's a global skin no worries. is_reseller_skin=1 - it's a reseller skin, but you'll be logging into it. Check variable reseller_skin_owner is_reseller_skin=2 - it's a reseller skin, and you'll be swapping to a global skin when you login. Check variable reseller_skin_owner (if allow_admin_login_as_to_reseller_skin=0) is_reseller_skin=-1 - an error occurred Check variable "is_reseller_skin_error" reseller_skin=/home/reseller/skins/resellerskin OR more likely:

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