maybe tie this in with make features read from the plan and not copied.
Templates / Administrator’s Webmin modules
is behaving exactly as I would expect for a features section. You make a change and it the change is instant, it does not need to be pushed to accounts.
What happens now!
Currently when you setup a new Virtual server, you select your ‘Account Plan’ and a ‘Server Template’, these settings are copied and installed into the new server and then the ‘Account Plan’ is not used anymore, even though it is listed as the ‘Account Plan’ in ‘Edit Virtual Server → Configurable settings → Account plan’
Read directly from ‘Account Plans’
‘Account Plan’ settings should be read directly from the plan which will allow ‘Account Plans’ to be updated by admins an…
opened 06:03PM - 16 Nov 23 UTC
## What is the issue
The `Account Plans` suffers from an issue where if a user … clicks on `Save and Apply` when he updates an `Account Plan`, it will wipe out any custom overrides he has applied to his accounts under this plan. Some people have got use to changing the permissions and options on a virtual server rather than updating an `Account Plan`.
If an admin just uses the `Save` button then the changes on the plan will only affect new users and therefore the tight sync between the `Account Plan` and `Accounts` becomes greater.
The use of the word `Defaults` on the account plan page is confusing and not correct after the initial creation of the virtual server, yet the functionality does not change.
The `Save` and `Save and Apply` options were introduced to allow users to keep customizations on certain accounts but this came at the cost of keeping accounts and the plans in sync.
## What do I propose, an Overview
Firstly, we need to get rid of the `Save` button as it will be pointless so we will just be left with `Save and Apply` button and it's logic.
We need to add checkboxes to the 2 pages (`Edit Account Plan` / `Server Owner Limits`) to define whether the plan settings can be overridden.
We can either have 1 check box on each page to cover all of the settings (A), or each section can have their own check box to allow for fine grained overriding (B). (B) is my preferred option.
*The images below assume the relevant pages have been updated as submitted in #686 and while this is preferable it is not required*
The checkboxes have a slightly different function on the different pages as outlined below:
**Edit Account Plan**
![Edit-Account-Plan-Override](https://github.com/virtualmin/virtualmin-gpl/assets/319997/c00d3875-420d-490b-b901-19b4159a3ad8)
- Allow all of these settings to be overridden / Allow these settings to be overridden
- When this option is ticked, this will allow accounts via `Edit Owner Limits` to override these plan settings. If it is not ticked then the option to override will be greyed out and they will not be able to change anything in this section.
- When this option is ticked and the admin clicks on `Save and Apply` accounts where plan members have `override these settings` on the corresponding section in `Edit Owner Limits` set to ticked, then these settings will not be overridden.
- If this option is not ticked, this section of the plan will be pushed to all member accounts irrespective of their settings and their `override these settings` will be unticked and the options greyed out as the permission to override have been removed.
- These settings define if they can be overriden in `Edit Owner Limits`
**Server Owner Limits**
![Server-Owner-Limits-Override](https://github.com/virtualmin/virtualmin-gpl/assets/319997/1602a5c9-4282-48a3-a21f-69a596407ce4)
- If allowed these checkboxes will allow an account owner to override a particular section of Plan settings and these settings and would not get overridden by a plan update as long as the permissions were maintained in the plan to allow overriding for this section
- if the account owner is not allowed to change a section of settings then they will all be greyed out can cannot be changed by them.
**Save and Apply routine**
The save and reply routine would need to be upgraded to take into account the booleans in the `Account Plan` and the `Server Owner Limits` so it can determine whether it can push settings to that particular account and it's various sections.
**Additional**
- you could add per account quota overrides.
- the tooltip text will need changing to remove the word default and maybe make them more relevant.
- I would rename `Edit Owner Limits` to `Edit Plan` or `Override Plan`. but limits is the wrong one.
- on the `Edit Account Plan` I would remove the word default from
- Default available features
- Default editing capabilities
and leave the server templates to be exactly that. Server templates are a unique and powerful feature that is well developed for custom apps but it does need some work on it done.