Project

General

Profile

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). The user can request the `RegistrationStateManager` for state changes by sending a `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** ** new state**|    
 | `PREPARATION_COMPLETE` | isAllowedSumbitter OR isRegistrationCurator | `PREPARATION`                   | `CURATION`      | 
 | `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`     |

Back