use of org.springframework.web.bind.annotation.ResponseStatus in project dhis2-core by dhis2.
the class ConfigurationController method removeSelfRegistrationOrgUnit.
@PreAuthorize("hasRole('ALL') or hasRole('F_SYSTEM_SETTING')")
@RequestMapping(value = "/selfRegistrationOrgUnit", method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void removeSelfRegistrationOrgUnit() {
Configuration config = configurationService.getConfiguration();
config.setSelfRegistrationOrgUnit(null);
configurationService.setConfiguration(config);
}
use of org.springframework.web.bind.annotation.ResponseStatus in project dhis2-core by dhis2.
the class ConfigurationController method setSystemId.
@PreAuthorize("hasRole('ALL')")
@ResponseStatus(value = HttpStatus.OK)
@RequestMapping(value = "/systemId", method = RequestMethod.POST)
public void setSystemId(@RequestBody(required = false) String systemId) {
systemId = ObjectUtils.firstNonNull(systemId, UUID.randomUUID().toString());
Configuration config = configurationService.getConfiguration();
config.setSystemId(systemId);
configurationService.setConfiguration(config);
}
use of org.springframework.web.bind.annotation.ResponseStatus in project dhis2-core by dhis2.
the class ConfigurationController method removeFeedbackRecipients.
@PreAuthorize("hasRole('ALL') or hasRole('F_SYSTEM_SETTING')")
@RequestMapping(value = "/feedbackRecipients", method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void removeFeedbackRecipients() {
Configuration config = configurationService.getConfiguration();
config.setFeedbackRecipients(null);
configurationService.setConfiguration(config);
}
Aggregations