Ensure User's are feature-reduced if Reseller is reduced

Version 1.56

Bugfix
Finished

When modifying the reseller.conf data of a Reseller, if a setting is shut off, say "SSH Access for Users", ensure that all packages are updated accordingly to shut it off, and go through all User's below that Reseller to ensure they can no longer use, for example ssh. This will only apply to the on/off checkbox items, and not the numerical/unlimited items. For the given options, when disabled, for each User below this Reseller, if that User's user.conf's value for this setting differs (eg: it was on), that User will have it's data activated (set to the value specific > OFF) This will also disable the settings for all packages under the Reseller. However, as this could be a very system load intensive (many read/writes if you have many Users), this operation will be done in the background. In this particular background disabling of only the changed setting will set. So if the set-to-disabled items are no related to some other feature, that other feature will not force-set the User. For example, if your sshd_config file had the User enabled.. but there was some sync issue where the user.conf ssh=OFF was set, the User would not be removed from the sshd_config. This is the only case where this assumes things are in sync, and is done solely for efficiency, since activating data on thousands of Users could be very very slow. All other areas that change User settings, like manually setting a value for the User, or changing a package entry (which updates all Users set to it), will force all settings back in place. =============== TASK.QUEUE When changing a Reseller's settings manually per-setting, or simply changing that Reseller package, for any setting that has *changed* to the OFF value, it will be added to the list. So if you only disable SSH for the Reseller's Users, and say.. anonymous FTP, the task.queue call will look like this: action=activate&value=reseller&reseller=fred&aftp=OFF&userssh=OFF (note: userssh converst to 'ssh' when checking user.conf files) The dataskq will pick up this request, and for each User in fred's users.list file, if the user.conf has 'aftp' or 'ssh' enabled, they'll be shut off.

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