# Inheritance

A user does not have to carry every setting. What a user has no value of their own for, they take from the users they inherit from, and in the end from the user named `default`. Inheritance is how one setting is kept in one place for many people.

## How a value is found

1. If the user has a value of their own, that is it.
2. If not, the users this one inherits from are asked, in their order: the first that has a value wins.
3. If none has, the value of `default` is used.

It works setting by setting. A user can take their idle time from a template and their password rules from `default`, and have a download limit of their own.

## What the page shows

At the top of an opened user: **Inheritance:** and the names this user inherits from. **Defaults** alone means: only from `default`.

On every card of settings:

| The card says | It means |
|---|---|
| **Inherited from default**, or from another user's name | the value comes from there. The fields are locked. |
| **Overridden for this user** | the user has a value of their own |

**Override** on a card gives the user their own value; **Revert** takes it away again.

![A card that was overridden](Users-Inheritance/override.png)

## Manage inheritance

The pencil beside the names opens **Manage Inheritance**.

![Manage Inheritance](Users-Inheritance/manage.png)

| Side | What it is |
|---|---|
| left | the users that can be added. **Add from group** limits them to a [group](Users-Groups.md); the search field finds one; **Hide applied** leaves out the ones that are on the right already. |
| right, **Applied inheritance** | the users this one inherits from. "Top has highest priority. Drag to reorder." The arrows move one up or down, the cross takes it off. |

**Save** stores it at once. When several users are selected, the change is for all of them, and the page asks first: "Set inheritance to ..." or "Remove all inheritance".

## The folders are inherited too

A user who inherits from another user also gets that user's folders, the virtual file system, beside their own. That is how a team shares one set of folders: put them on one user and let the members inherit from it.

## Good practice

- Make a user per kind of person, such as `staff_template` or `partner_template`, set it up once, and let the real users inherit from it. Do not log in with the template: give it no password that anybody knows, or disable it.
- Keep `default` for what really holds for everybody: session times, password rules, the look of the web interface.
- Override on a single user only what is special about that person. With **Hide defaults** on you then see exactly that.
- A user you inherit from must be in the same connection group.

## Where it is kept

In the file `inheritance.XML` of the connection group, or the table `INHERITANCE` when [users are in a database](Prefs-User-Config-SQL.md).
