Skip to content

Commit

Permalink
Added: Accepted state requirement for setting user as developer or pilot
Browse files Browse the repository at this point in the history
  • Loading branch information
djuarezgf committed Jan 29, 2024
1 parent 5f13162 commit f64b6ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- EmailSenderIfError annotation
- Frontend DTO converters
- Fetch all user visible notifications
- Accepted state requirement for setting user as developer or pilot
5 changes: 3 additions & 2 deletions src/main/java/de/samply/app/ProjectManagerController.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import de.samply.project.ProjectType;
import de.samply.project.event.ProjectEventActionsException;
import de.samply.project.event.ProjectEventService;
import de.samply.project.state.ProjectBridgeheadState;
import de.samply.project.state.ProjectState;
import de.samply.query.OutputFormat;
import de.samply.query.QueryFormat;
Expand Down Expand Up @@ -143,7 +144,7 @@ public ResponseEntity<String> fetchProjectsBridgeheads(
}

@RoleConstraints(projectRoles = {ProjectRole.CREATOR, ProjectRole.PROJECT_MANAGER_ADMIN})
@StateConstraints(projectStates = {ProjectState.DEVELOP})
@StateConstraints(projectStates = {ProjectState.DEVELOP}, projectBridgeheadStates = {ProjectBridgeheadState.ACCEPTED})
@EmailSender(templateType = EmailTemplateType.INVITATION, recipients = {EmailRecipientType.EMAIL_ANNOTATION})
@EmailSender(templateType = EmailTemplateType.NEW_PROJECT, recipients = {EmailRecipientType.BRIDGEHEAD_ADMIN})
@FrontendSiteModule(site = ProjectManagerConst.PROJECT_VIEW_SITE, module = ProjectManagerConst.USER_MODULE)
Expand All @@ -159,7 +160,7 @@ public ResponseEntity<String> setUserAsDeveloper(
}

@RoleConstraints(organisationRoles = {OrganisationRole.PROJECT_MANAGER_ADMIN})
@StateConstraints(projectStates = {ProjectState.PILOT})
@StateConstraints(projectStates = {ProjectState.PILOT}, projectBridgeheadStates = {ProjectBridgeheadState.ACCEPTED})
@EmailSender(templateType = EmailTemplateType.INVITATION, recipients = {EmailRecipientType.EMAIL_ANNOTATION})
@EmailSender(templateType = EmailTemplateType.NEW_PROJECT, recipients = {EmailRecipientType.BRIDGEHEAD_ADMIN})
@FrontendSiteModule(site = ProjectManagerConst.PROJECT_VIEW_SITE, module = ProjectManagerConst.USER_MODULE)
Expand Down

0 comments on commit f64b6ea

Please sign in to comment.