Improve module listing and implement help doc draft for tests

This commit is contained in:
Dennis Eichhorn 2018-07-06 20:45:15 +02:00
parent b738cb4d3b
commit d04b60349e
17 changed files with 135 additions and 12 deletions

113
Docs/Help/en/accounts.md Normal file
View File

@ -0,0 +1,113 @@
# Accounts
In `Accounts` you can create, delete and modify the accounts. Accounts are necessary for almost all data associated to persons or organizations. Usually modules either create new accounts when they want to store personal data or use an existing account for which the data should be stored.
## General
![General Settings]({/base}{/rootPath}/Modules/Admin/Docs/Help/img/accounts/accounts_general.png)
### ID
The id (unique identifier) is automatically generated.
### Type
An account can be either a:
* `Person`
* or a `Organization`
Both types can have the same permissions and functionality. This can be helpful for a lot of modules that rely on organizations or companies (e.g. a sales module that handles people as customers but also companies as customers).
### Status
An account has the following status:
* Active
* Inactive (usually used for long inactive accounts)
* Timeout (usually used for timeouts in case of bad behaviour which will be automatically revoked after a certain time)
* Banned (usually used to disable accounts for an indefinate time)
### Username
Name of the account which can be shown in various places insdead of the full name.
### Name1 - Name3
The name of the account. In some cases 3 names are necessary such as first name, middle name and family name. If more than 3 names are required you have to additionaly put them into one of the 3 name fields.
### Email
The email field is the main email contact address for the account. This email address will be also used for password recovery.
### Password
The password field can be used to overwrite the current account password. If the password gets changed the user will also receive a notification email.
Alternatively click the `Reset` button and the account will receive an email with a temporary link redirecting the user to a page where he can change the password.
The required password structure is defined in the general settings.
## Permissions
![General Settings]({/base}{/rootPath}/Modules/Admin/Docs/Help/img/accounts/accounts_permissions.png)
Permissions have the following components which can be combined to either address a wide e.g. range of units, applications or modules or in order to address a very specific combination of those.
### Unit
The unit this permission is set for. Leave empty to address all units
### App
The application this permission is set for. Leave empty to address all applications
### Module
The module this permission is set for. Leave empty to address all modules
### Type
The type is a `module` specific subpart which only should be set if the module is defined in the permission. For further information what kind of types are available for a module please refere to the module specific documentation. Usually it referes to a single page of a module.
### Element
The element is a `module` and `type` specific subpart which only should be set if the `type` is defined in the permission. For further information what kind of elements are available for a module and type please refere to the module specific documentation. Usually it referes to a section on a module page.
### Component
The component is a `module`, `type` and `element` specific subpart which only should be set if the `element` is defined in the permission. For further information what kind of components are available for a module, type and element please refere to the module specific documentation. Usually it referes to a single input or option in a module.
### Permission
The actual permission consists of create (C), read (R), update (U), delete (D), permission (P) options.
#### Create (C)
This allows a user to create something. Usually a user should also have (R) permission in this case.
#### Read (R)
This allows a user to read/see something.
#### Update (U)
This allows a user to update/modify something. Usually a user should also have (R) permission in this case.
#### Delete (D)
This allows a user to delete/remove something. Usually a user should also have (R) permission in this case.
#### Permission (P)
This allows a user to change permissions. Usually a user should also have (C, R, U, D) permissions because the user could just give himself these permissions anyways. Only selected users should have this permission even if it is only specified for a specific module, type, element or component.
## Groups
![General Settings]({/base}{/rootPath}/Modules/Admin/Docs/Help/img/accounts/accounts_groups.png)
In the groups section you can see all groups that this account is assigned to and you can also add or remove the account to other groups. If you would like to add the account to the same groups as a different account just select the account whos groups you would like to copy and the account will be added to the same groups (one time only, there will be **no relation** between the two accounts.
## Audit Log
In the audit log you can see all the changes of the group.

View File

@ -4,7 +4,11 @@ In `Groups` you can create, delete and modify the groups. Groups are global for
## General
![General Settings](img/groups/groups_general.png)
![General Settings]({/base}{/rootPath}/Modules/Admin/Docs/Help/img/groups/groups_general.png)
### ID
The id (unique identifier) is automatically generated.
### Name
@ -16,7 +20,7 @@ Sometimes it makes sense to provide some additional information for a group. In
## Permissions
![General Settings](img/groups/groups_permissions.png)
![General Settings]({/base}{/rootPath}/Modules/Admin/Docs/Help/img/groups/groups_permissions.png)
Permissions have the following components which can be combined to either address a wide e.g. range of units, applications or modules or in order to address a very specific combination of those.
@ -70,7 +74,7 @@ This allows a user to change permissions. Usually a user should also have (C, R,
## Accounts
![General Settings](img/groups/groups_accounts.png)
![General Settings]({/base}{/rootPath}/Modules/Admin/Docs/Help/img/groups/groups_accounts.png)
In the accounts section you can see all users that are assigned to this group and you can also add or remove accounts. If you would like to add all users from a different group simply select the group and all the users that are part of this group will be added to this group as well (one time only, there will be **no relation** (e.g. parent/child group) between these two groups).

View File

@ -8,7 +8,7 @@ In the admin module under `General` the global settings can be set.
In the security section it's possible to define and modify the global security settings. These settings will be used for every user.
![General Settings](img/general/settings_security.png)
![General Settings]({/base}{/rootPath}/Modules/Admin/Docs/Help/img/general/settings_security.png)
#### Password Regex
@ -80,13 +80,13 @@ In the logging section the logging settings can be defined. These settings don't
**Recommended:** `active and default path`
![General Settings](img/general/settings_logging.png)
![General Settings]({/base}{/rootPath}/Modules/Admin/Docs/Help/img/general/settings_logging.png)
## Localization
In the localization tab it's possible to define the default localization settings. Be aware that users may have localization settings different from the default settings. These localization settings are only important to provide a fallback if the user localization settings are not working.
![Localization Settings](img/general/settings_localization.png)
![Localization Settings]({/base}{/rootPath}/Modules/Admin/Docs/Help/img/general/settings_localization.png)
### Defaults

View File

@ -0,0 +1,5 @@
# Table of Contents
* [Settings]({%}&page=settings)
* [Accounts]({%}&page=accounts)
* [Groups]({%}&page=groups)

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -93,6 +93,7 @@ return [
'Profile' => 'Profile',
'RAddress' => 'Remote Address',
'ReCache' => 'Re-Cache',
'Reset' => 'Reset',
'Running' => 'Running',
'Short' => 'Short',
'Sea' => 'Sea',

View File

@ -52,7 +52,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td><label for="iEmail"><?= $this->getHtml('Email'); ?></label>
<tr><td><input id="iEmail" name="email" type="email" placeholder="&#xf0e0; d.duck@duckburg.com" value="<?= $this->printHtml($account->getEmail()); ?>">
<tr><td><label for="iPassword"><?= $this->getHtml('Password'); ?></label>
<tr><td><input id="iPassword" name="password" type="password" placeholder="&#xf023; Pa55ssw0rd?">
<tr><td><div class="ipt-wrap"><div class="ipt-first"><input id="iPassword" name="password" type="password" placeholder="&#xf023; Pa55ssw0rd?"></div><div class="ipt-second"> or <button><?= $this->getHtml('Reset'); ?></button></div></div>
<tr><td><input id="account-edit-submit" name="editSubmit" type="submit" value="<?= $this->getHtml('Save', 0, 0); ?>">
</table>
</form>

View File

@ -41,12 +41,12 @@ $installed = $this->app->moduleManager->getInstalledModules();
<td data-label="<?= $this->getHtml('ID', 0, 0) ?>"><a href="<?= $url; ?>"><?= $this->printHtml($module['name']['id']); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($module['name']['external']); ?></a>
<td data-label="<?= $this->getHtml('Version') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($module['version']); ?></a>
<td data-label="<?= $this->getHtml('Status') ?>"><a href="<?= $url; ?>"><?php if (\in_array($module['name']['internal'], $active))
echo strtolower($this->getHtml('Active'));
elseif (\in_array($module['name']['internal'], $installed))
echo strtolower($this->getHtml('Inactive'));
<td data-label="<?= $this->getHtml('Status') ?>"><a href="<?= $url; ?>"><?php if (isset($active[$module['name']['internal']]))
echo \mb_strtolower($this->getHtml('Active'));
elseif (isset($installed[$module['name']['internal']]))
echo \mb_strtolower($this->getHtml('Inactive'));
else
echo strtolower($this->getHtml('Available')); ?></a>
echo \mb_strtolower($this->getHtml('Available')); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="4" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>