Class DokkuAccountTranslationsController

java.lang.Object
edu.ucsb.cs156.frontiers.controllers.ApiController
edu.ucsb.cs156.frontiers.controllers.DokkuAccountTranslationsController

@RequestMapping("/api/dokku/translations") @RestController public class DokkuAccountTranslationsController extends ApiController
CRUD for DokkuAccountTranslation: the table of email addresses whose dokku username is not simply the part of the email before the @.

The table is global (not per-course), but it is managed from the Dokku tab of a course, so every endpoint takes a courseId that is used only to check that the caller can manage that course.

  • Constructor Details

    • DokkuAccountTranslationsController

      public DokkuAccountTranslationsController()
  • Method Details

    • getTranslations

      @PreAuthorize("@CourseSecurity.hasManagePermissions(#root, #courseId)") @GetMapping("") public List<DokkuAccountTranslation> getTranslations(@RequestParam Long courseId)
    • postTranslation

      @PreAuthorize("@CourseSecurity.hasManagePermissions(#root, #courseId)") @PostMapping("") public DokkuAccountTranslation postTranslation(@RequestParam Long courseId, @RequestParam String email, @RequestParam String username)
    • putTranslation

      @PreAuthorize("@CourseSecurity.hasManagePermissions(#root, #courseId)") @PutMapping("") public DokkuAccountTranslation putTranslation(@RequestParam Long courseId, @RequestParam String email, @RequestParam String username)
    • deleteTranslation

      @PreAuthorize("@CourseSecurity.hasManagePermissions(#root, #courseId)") @DeleteMapping("") public Object deleteTranslation(@RequestParam Long courseId, @RequestParam String email)