feature request #6655
Updated by Andreas Kohlbecker almost 7 years ago
We need a `RegistrationStateManager` which can change the RegistrationState on behalf of the user, since the user is not permitted to change the Registration again (see #6654, see **first step** and **second step** --> this issue only is needed for the second step!!!). #6654). The user can request the `RegistrationStateManager` for state changes by sending a `RegistrationStateEvent`. `RegistrationStateEvent` The `RegistrationStateEvent` can transport the following messages to which the `RegistrationStateManager` will react accordingly to the current state, the users permission sending the event: The `RegistrationStateManager` uses the following internal permission tests: * isRegistrationCurator: `user.hasGrantedAuthority("Registration.[UPDATE]")` * isAllowedSumbitter: `user = Registration.submitter AND user.hasGrantedAuthority("Registration.[CREATE]")` | RegistrationStateEvent | RegistrationStateManager | | | |------------------------|---------------------------------------------|-------------------------------|---------------| | **Event message** | **tests** | **state to check** | **new state** | | `WITHDRAW` | isAllowedSumbitter OR isRegistrationCurator | not `PUBLISHED` | `REJETCED` | | `DATA_VALID` | isRegistrationCurator | not `PUBLISHED` OR `REJETCED` | `READY` | | `DATA_INCOMPLETE` | isRegistrationCurator | not `PUBLISHED` OR `REJETCED` | `PREPARATION` | | `PUBLISHED` | isRegistrationCurator | `READY` | `PUBLISHED` |