Skip to content

Commit 9f62ffb

Browse files
author
Bastian Heist
committed
BUGFIX: Documentation updates
Fixed some errors in the docs and added the info which branch is used for which version(s).
1 parent e99a663 commit 9f62ffb

File tree

1 file changed

+42
-38
lines changed

1 file changed

+42
-38
lines changed

README.md

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# Sandstorm.UserManagement Neos / Flow Package
22

3-
## Features
3+
# 0. Features
44
This package works in Neos CMS and Flow and provides the following functionality:
55

66
* Registration of (frontend) users via a registration form
77
* Sending out an e-mail for account confirmation
88
* Login of registered (frontend) users via a login form
99
* "Forgotten password" with password reset e-mail
1010

11-
## Compatibility and Maintenance
11+
# 1. Compatibility and Maintenance
1212
Sandstorm.UserManagement is currently being maintained for Neos 2.3 LTS and Neos 3.x.
1313

14-
| Neos / Flow Version | Sandstorm.UserManagement Version | Maintained |
15-
|----------------------------|----------------------------------|-----------------|
16-
| Neos 3.x, Flow 4.x | 5.x | Yes |
17-
| Neos 2.3 LTS, Flow 3.3 LTS | 3.x | Bugfixes |
18-
| Neos 2.2, Flow 3.2 | 1.x | No |
14+
| Neos / Flow Version | Sandstorm.UserManagement Version | Branch | Maintained |
15+
|----------------------------|----------------------------------|--------|------------|
16+
| Neos 3.x, Flow 4.x | 5.x | master | Yes |
17+
| Neos 2.3 LTS, Flow 3.3 LTS | 3.x | 3.0 | Bugfixes |
18+
| Neos 2.2, Flow 3.2 | 1.x | No | No |
1919

2020
## Breaking changes in Version 5.x
2121
### Configuration Changes
@@ -46,15 +46,34 @@ In the registration email templates, two variables are no longer available by de
4646
However, in the registration email, "registrationFlow" is now available, which gives access to the email as well to all
4747
other information the user has entered during the registration process (as long as it is stored in the RegistrationFlow object).
4848
49-
# Configuration
49+
# 2. Configuration
5050
5151
## Setup
52-
Run `./flow doctrine:migrate` after you add this package to install its model. The package automatically exposes its routes
53-
via auto-inclusion in the package settings.
54-
Attention: Any routes defined in the global `Routes.yaml` are loaded before this package's routes, so they may be overriden.
55-
This is especially true for the default Flow subroutes, so make sure you have removed those from your global `Routes.yaml`.
52+
There are the basic config steps:
53+
1. Run `./flow doctrine:migrate` after you add this package to install its model. The package automatically exposes its routes
54+
via auto-inclusion in the package settings. Attention: Any routes defined in the global `Routes.yaml` are loaded before this package's
55+
routes, so they may be overriden. This is especially true for the default Flow subroutes, so make sure you have removed those from your global `Routes.yaml`.
5656
If you can't remove them, just include the subroutes for this package manually before the Flow subroutes.
57-
When using this as part of your own plugin keep in mind that you have to add this in your package's `composer.json`. After requiring new packages you have to run `./flow neos.flow:package:rescan` to regenerate to order in which all your packages are loaded.
57+
58+
2. Require this package in your own package's `composer.json`. This will inform Flow that it needs to load UserManagement before
59+
your packages, which allows you to override config and will make sure authorizations work correctly. Keep in mind that you have to add this into all
60+
packages that use features from user management - very important if your site is split into multiple packages or plugins.
61+
Here's an example:
62+
```
63+
{
64+
"description": "Your Site Package",
65+
"type": "neos-site", (or "neos-package" if you're using Flow only or building a Plugin)
66+
"require": {
67+
"neos/neos": "*",
68+
"sandstorm/usermanagement": "*"
69+
}
70+
...more settings here...
71+
}
72+
```
73+
74+
3. Run `./flow neos.flow:package:rescan` to regenerate to order in which all your packages are loaded.
75+
76+
4. Add and adapt the configuration settings below to your config (make sure to not miss the special Neos settings).
5877

5978
## Basic configuration options
6079
These are the basic configuration options for e-mails, timeouts etc. You will usually want to adapt these to your application.
@@ -92,7 +111,7 @@ Sandstorm\UserManagement\Domain\Service\UserCreationServiceInterface:
92111
Be aware that the `NeosUserCreationService` requires a non-empty firstName and lastName to be present in the `RegistrationFlow` attributes
93112
as it's in the templates of this package.
94113
95-
### Neos 2.3 (Flow 3.3) and higher - UserManagement 2.x and higher
114+
### Neos 3.0 and higher
96115
97116
Add the following to your package's (or the global) `Settings.yaml`. This creates a separate authentication provider so Neos can
98117
distinguish between frontend and backend logins.
@@ -103,7 +122,7 @@ Neos:
103122
security:
104123
authentication:
105124
providers:
106-
'Typo3BackendProvider':
125+
'Neos.Neos:Backend':
107126
requestPatterns:
108127
Sandstorm.UserManagement:NeosBackend:
109128
pattern: Sandstorm\UserManagement\Security\NeosRequestPattern
@@ -119,26 +138,12 @@ Neos:
119138

120139
```
121140
122-
### Neos 2.2 and before - UserManagement 1.x
123-
Before Flow 3.3, the syntax for attaching a pattern to an authentication provider is different.
124-
```
125-
126-
Neos:
127-
Flow:
128-
security:
129-
authentication:
130-
providers:
131-
'Typo3BackendProvider':
132-
requestPatterns:
133-
'Sandstorm\UserManagement\Security\NeosRequestPattern': 'backend'
134-
'Sandstorm.UserManagement:Login':
135-
provider: 'PersistedUsernamePasswordProvider'
136-
requestPatterns:
137-
'Sandstorm\UserManagement\Security\NeosRequestPattern': 'frontend'
141+
### Neos 2.3 (Flow 3.3)
138142
139-
```
143+
Before Neos 3.0, the `Neos.Neos:Backend` authentication provider was called `Typo3BackendProvider`. Replace `Neos.Neos:Backend`
144+
with `Typo3BackendProvider` in the config above.
140145
141-
# Usage
146+
# 3. Usage
142147
143148
## CLI Commands
144149
### Creating users
@@ -294,22 +299,21 @@ class RegistrationFlowValidationService implements RegistrationFlowValidationSer
294299
}
295300
```
296301
297-
# Known issues
302+
# 4. Known issues
298303
299304
Feel free to submit issues/PRs :)
300305
301-
# TODOs
306+
# 5. TODOs
302307
303-
* We haven't described all features in detail yet.
304308
* An important missing feature: configuring password restrictions (8 chars min, a smiley and a celtic rune, ...)
305309
* I18N for Templates.
306310
* Tests.
307311
308-
# FAQ
312+
# 6. FAQ
309313
310314
* *What happens if the user did not receive the registration email?*
311315
Just tell the user to register again. In this case, previous unfinished registrations are discarded.
312316
313-
# License
317+
# 7. License
314318
MIT.
315319
https://opensource.org/licenses/MIT

0 commit comments

Comments
 (0)