users_can_add_remove_domains: Admin or Reseller exemption

Version 1.572

Bugfix
Finished

Related to this feature: https://www.directadmin.com/features.php?id=2275 which lets you block the deletion (and removal) of a domain. The issue is that this applies to everyone on the User Level, including Admins and Resellers. This change allows you to add a mask to the directadmin.conf users_can_add_remove_domains value, to specify if these rules should exempt Admin and/or Resellers. Current options: 0 - allow everyone to add/delete 1 - block everyone to delete 2 - block everyone to add and delete for the mask, those will cover the first 3 bits (even though they could be done in 2, we'll use 3 for backwards compatibility) Bits 4 and 5 will control the Reseller exemption, and Admin exemptions, respectively. To exempt a Reseller, add 16 to your value. To exempt an Admin, add 32 to your value. (To exempt both, add 16+32 to your value) For example, say you like use 2 to block both creation and deletion. You want to allow Admins to create/delete, so you'd add 32, giving you 34: users_can_add_remove_domains=34 meaning, Resellers are still blocked from creating/deleting the values.

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