Solved Disable certain options in all packages to be created

You have to "guess" at the reseller's username by the ${package_filename} variable:

Thanks for testing it.

Not giving them the option to even fill out certain items they don't have access to would seem to be ideal and make them mostly oblivious to what they don't have access to.

I guess it is working this way already. At least for those items where you choose ON|OFF. It might not work as good as wanted where you change quantity: domains, subdomains, databases, etc.
 
I just wish there was an override file, i.e. /usr/local/directadmin/data/users/%reseller%/default_package_limits.conf

Such that an API call to /CMD_SHOW_USER_PACKAGE would read that file to grab package item limits and enabled/disabled items. The absence of the override file or the absence of an item in the override file would still produce the limits we are currently seeing.

That would be my preference.
 
Do you happen to know how or if it's possible to overwrite variables in the pre scripts?

For example, putting:

nemailml=0

in the package_write_pre.sh bash script, the expected behavior would be that the package would be created with 0 mailing lists, regardless of what was entered in the form.

But that does not appear to be happening. The package is created with the value from the form.
 
I did not find anything to confirm that. Instead of it you might try using a POST script and modify a package after all.
That's what I ended up doing. Was kind of hoping to avoid having to have another hook script. Not end of the world, but not quite ideal.
 
Back
Top