Integrated FOSUserBundle (#216)
This commit is contained in:
@@ -1,10 +1,77 @@
|
||||
# Configurations
|
||||
|
||||
There are several configurations that can be configured with the yaml files in `config/packages/*.yaml``
|
||||
Configuration of Kimai is spread in all files in the `config/`directory but mainly it these files:
|
||||
|
||||
Please read _Overwriting local configs_ to know where to store your own settings.
|
||||
- `.env` - environment specific settings
|
||||
- `config/packages/kimai.yaml` - Kimai specific settings
|
||||
- `config/packages/admin_lte.yaml` - theme specific settings ([read more](https://github.com/kevinpapst/AdminLTEBundle/blob/master/Resources/docs/configurations.md))
|
||||
- `config/packages/fos_user.yaml` - user management and email settings
|
||||
- `config/packages/local.yaml` - your local configuration settings
|
||||
|
||||
## Duration only
|
||||
There are several other configurations that could potentially be interesting for you in [config/packages/*.yaml](../../config/packages/).
|
||||
|
||||
If you want to adjust a setting from any of these files, use `local.yaml` (see below).
|
||||
|
||||
## Environment specific settings (.env)
|
||||
|
||||
The most basic settings, which need always be adjusted are stored in the `.env` file:
|
||||
|
||||
- `MAILER_URL` - smtp connection for emails
|
||||
- `MAILER_FROM` - application specific "from" address for all emails
|
||||
- `APP_ENV` - environment for the runtime (use `prod` if you are unsure)
|
||||
- `DATABASE_URL` - database connection for storing all application data
|
||||
- `DATABASE_PREFIX` - precix for any Kimai table in the configured database
|
||||
- `APP_SECRET` - secret used for hasing user password (if you cahnge this, every password is invalid afterwards)
|
||||
|
||||
## Overwriting local configs (local.yaml)
|
||||
|
||||
You can create the file `config/packages/local.yaml` and store your own settings inside. This file will NEVER be shipped with Kimai.
|
||||
So having your custom settings in this file allows you to easily update Kimai. This is the same concept which is used for the `.env` file.
|
||||
|
||||
An example `config/packages/local.yaml` file might look like this:
|
||||
|
||||
```yaml
|
||||
kimai:
|
||||
timesheet:
|
||||
rounding:
|
||||
default:
|
||||
begin: 15
|
||||
end: 15
|
||||
|
||||
admin_lte:
|
||||
options:
|
||||
default_avatar: build/apple-touch-icon.png
|
||||
```
|
||||
|
||||
The `local.yaml` file will be imported as last configuration file, so you can overwrite any setting from the `config/packages/` directory.
|
||||
|
||||
After changing this file you have to clear the cache with `bin/console cache:clear` or `bin/console cache:clear --env=prod`.
|
||||
|
||||
## Emails (swiftmailer.yaml)
|
||||
|
||||
Kimai uses Swiftmailer to sent emails. You configure your SMTP connection setting in [.env](../../.env.sample).
|
||||
|
||||
For more configuration details read the [Swiftmailer](https://symfony.com/doc/current/reference/configuration/swiftmailer.html) documentation
|
||||
and apply the settings in [swiftmailer.yaml](../../config/packages/swiftmailer.yaml).
|
||||
|
||||
## Security
|
||||
|
||||
Kimai uses the FOSUserBundle for security related tasks like user management. Its configuration can be found in [fos_user.yaml](../../config/packages/fos_user.yaml).
|
||||
|
||||
### User management emails (fos_user.yaml)
|
||||
|
||||
Kimai sents emails for newly registered users ([if that is configured](users.md)) and forgotten password requests.
|
||||
You can change the contents of these emails by editing [fos_user.yaml](../../config/packages/fos_user.yaml).
|
||||
|
||||
You can find more information in the [FOSUserBundle](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html) documentation.
|
||||
|
||||
### Remember me login (security.yaml)
|
||||
|
||||
The default period for the `Remember me` option can be changed in the config file [security.yaml](../../config/packages/security.yaml).
|
||||
|
||||
## Timesheets (kimai.yaml)
|
||||
|
||||
### Duration only
|
||||
|
||||
Kimai supports two modes for displaying and recording timesheet entries:
|
||||
|
||||
@@ -19,11 +86,7 @@ You can activate the `duration_only` mode by switching the configuration key `ki
|
||||
|
||||
For supported formats while entering the `duration` please see the [timesheet chapter](timesheet.md)
|
||||
|
||||
## Remember me login
|
||||
|
||||
The default period for the `Remember me` option can be changed in the config file [security.yaml](../../config/packages/security.yaml).
|
||||
|
||||
## Timesheet records - rounding of begin, end and duration
|
||||
### Rounding of begin, end and duration for timesheet records
|
||||
|
||||
Rounding rules are used to round the begin & end dates and the duration for timesheet records.
|
||||
|
||||
@@ -38,7 +101,7 @@ Rounding rules are used to round the begin & end dates and the duration for time
|
||||
|
||||
You can configure your `rounding` rules by changing the configuration file [kimai.yaml](../../config/packages/kimai.yaml).
|
||||
|
||||
### Examples
|
||||
#### Examples
|
||||
|
||||
A simple example to always charge at least 1 hour for weekend work (even if you only worked for 5 minutes) could look like this:
|
||||
|
||||
@@ -66,7 +129,7 @@ kimai:
|
||||
duration: 0
|
||||
```
|
||||
|
||||
## Timesheet records - hourly rates
|
||||
### Hourly rates for timesheet records
|
||||
|
||||
If you want to apply different hourly rates multiplication `factor` for specific weekdays, you can use this `rates` configuration.
|
||||
|
||||
@@ -80,7 +143,7 @@ If you want to apply different hourly rates multiplication `factor` for specific
|
||||
|
||||
You can configure the `hourly_rate` rules by changing the configuration file [kimai.yaml](../../config/packages/kimai.yaml).
|
||||
|
||||
### Examples
|
||||
#### Examples
|
||||
|
||||
1. The "workdays" rule will use the default "hourly rate" for each timesheet entry recorded between "monday" to "friday" as a multiplication with 1 will not change the result
|
||||
2. The "weekend" rule will add 50% to each timesheet entry that will be recorded on "saturdays" or "sundays"
|
||||
@@ -96,20 +159,3 @@ kimai:
|
||||
days: ['saturday','sunday']
|
||||
factor: 1.5
|
||||
```
|
||||
|
||||
## Overwriting local configs
|
||||
|
||||
You can create the file `config/packages/local.yaml` and store your own settings inside. This file will NEVER be shipped with Kimai.
|
||||
|
||||
So having your custom settings in this file allows you to easily update Kimai. This is the same concept as used for the `.env` file.
|
||||
|
||||
An example `config/packages/local.yaml` file might look like this:
|
||||
```yaml
|
||||
kimai:
|
||||
timesheet:
|
||||
rounding:
|
||||
default:
|
||||
begin: 15
|
||||
end: 15
|
||||
```
|
||||
After changing the file you have to clear the cache with `bin/console cache:clear` or `bin/console cache:clear --env=prod`.
|
||||
|
||||
@@ -5,7 +5,7 @@ Internal documentation for project maintainers
|
||||
## Create a release
|
||||
|
||||
- Prepare a GitHub release-draft
|
||||
- Change .github_changelog_generator config accordingly to new release tag
|
||||
- Change .github_changelog_generator config accordingly to new release tag (increase future release)
|
||||
- Create CHANGELOG.md with [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator]) by running `github_changelog_generator kevinpapst/kimai2`
|
||||
- Push a release branch and add it as last PR merge into master
|
||||
- Edit the release-draft and add the "Full changelog" link + everything from the "Merged pull requests" section from CHANGELOG.md
|
||||
|
||||
@@ -12,12 +12,12 @@ There are multiple pre-defined roles in Kimai, which define the ACLs. A user can
|
||||
| ROLE_ADMIN | ROLE_TEAMLEAD | All of the above, plus: editing customers, editing projects, editing activities |
|
||||
| ROLE_SUPER_ADMIN | ROLE_ADMIN | All of the above, plus: editing users |
|
||||
|
||||
# Login & Authentication
|
||||
## Login
|
||||
|
||||
- User can login with their username or email
|
||||
- If you activate the `Remember me` option, you can use use the most common functions within the next days without a new login
|
||||
|
||||
## Remember me login
|
||||
### Remember me login
|
||||
|
||||
If you have chosen to login with the `Remember me` option, your login will be extended to one week (default value).
|
||||
After coming back and being remembered you have access to all the following features:
|
||||
@@ -31,3 +31,28 @@ form when you try to access them. This is a security feature to prevent abuse in
|
||||
environments.
|
||||
|
||||
Read the [configurations chapter](configurations.md) if you want to change the value.
|
||||
|
||||
## User registration
|
||||
|
||||
User registration with instant approval is activated by default, so users can register and will be able to login and start time-tracking instantly.
|
||||
If you want your new users to use email based activation, then change the following configuration:
|
||||
|
||||
- in `config/packages/fos_user.yaml` change the setting `fos_user.registration.confirmation.enabled` to true (default: false)
|
||||
|
||||
If you want to deactivate the user registration completely, you have to change the following configs:
|
||||
|
||||
- in `config/packages/admin_lte.yaml` remove the route alias `admin_lte.routes.adminlte_registration` (this will remove the link from the login form)
|
||||
- in `config/routes.yaml` remove the block `fos_user_registration` (this will deactivate the functionality)
|
||||
|
||||
## Password reset
|
||||
|
||||
The reset password function is enabled by default.
|
||||
If you want to deactivate this feature you have to change the following configs:
|
||||
|
||||
- in `config/packages/admin_lte.yaml` remove the route alias `admin_lte.routes.adminlte_password_reset` (this will remove the link from the login form)
|
||||
- in `config/routes.yaml` remove the block `fos_user_resetting` (this will deactivate the functionality)
|
||||
|
||||
If you want to configure the behaviour (like the allowed time between multiple retries) then configure the settings:
|
||||
|
||||
- in `config/packages/fos_user.yaml` the key below `fos_user.registration.resetting` (see [documentation](http://symfony.com/doc/current/bundles/FOSUserBundle/configuration_reference.html))
|
||||
- the values `retry_ttl` and `token_ttl` are configured in seconds (7220 = 2 hours)
|
||||
Reference in New Issue
Block a user