Class PermissionsController


  • @RestController
    @RequestMapping("/api/permissions")
    @Transactional
    public class PermissionsController
    extends org.molgenis.api.ApiController
    • Constructor Detail

      • PermissionsController

        public PermissionsController​(org.molgenis.data.security.permission.PermissionService permissionService,
                                     cz.jirutka.rsql.parser.RSQLParser rsqlParser,
                                     org.molgenis.security.acl.ObjectIdentityService objectIdentityService,
                                     org.molgenis.data.security.permission.UserRoleTools userRoleTools,
                                     org.molgenis.data.security.permission.EntityHelper entityHelper)
    • Method Detail

      • enableRLS

        @PostMapping("types/{typeId}")
        public org.springframework.http.ResponseEntity enableRLS​(javax.servlet.http.HttpServletRequest request,
                                                                 @PathVariable("typeId")
                                                                 String typeId)
      • disableRLS

        @DeleteMapping("types/{typeId}")
        public org.springframework.http.ResponseEntity disableRLS​(@PathVariable("typeId")
                                                                  String typeId)
      • getRlsEntities

        @GetMapping("types")
        public org.molgenis.api.model.response.ApiResponse getRlsEntities()
      • getSuitablePermissions

        @GetMapping("types/permissions/{typeId}")
        public org.molgenis.api.model.response.ApiResponse getSuitablePermissions​(@PathVariable("typeId")
                                                                                  String typeId)
      • createAcl

        @PostMapping("objects/{typeId}/{objectId}")
        public org.springframework.http.ResponseEntity createAcl​(javax.servlet.http.HttpServletRequest request,
                                                                 @PathVariable("typeId")
                                                                 String typeId,
                                                                 @PathVariable("objectId")
                                                                 String identifier)
      • getAcls

        @GetMapping("objects/{typeId}")
        public org.molgenis.api.model.response.PagedApiResponse getAcls​(@PathVariable("typeId")
                                                                        String typeId,
                                                                        @RequestParam(value="page",required=false)
                                                                        Integer page,
                                                                        @RequestParam(value="pageSize",required=false)
                                                                        Integer pageSize)
      • getPermissionsForObject

        @GetMapping("{typeId}/{objectId}")
        public org.molgenis.api.model.response.ApiResponse getPermissionsForObject​(@PathVariable("typeId")
                                                                                   String typeId,
                                                                                   @PathVariable("objectId")
                                                                                   String identifier,
                                                                                   @RequestParam(value="q",required=false)
                                                                                   String queryString,
                                                                                   @RequestParam(value="inheritance",defaultValue="false",required=false)
                                                                                   boolean inheritance)
      • getPermissionsForType

        @GetMapping("{typeId}")
        public org.molgenis.api.model.response.PagedApiResponse getPermissionsForType​(@PathVariable("typeId")
                                                                                      String typeId,
                                                                                      @RequestParam(value="q",required=false)
                                                                                      String queryString,
                                                                                      @RequestParam(value="page",required=false)
                                                                                      Integer page,
                                                                                      @RequestParam(value="pageSize",required=false)
                                                                                      Integer pageSize,
                                                                                      @RequestParam(value="inheritance",defaultValue="false",required=false)
                                                                                      boolean inheritance)
      • getPermissionsForUser

        @GetMapping
        public org.molgenis.api.model.response.ApiResponse getPermissionsForUser​(@RequestParam(value="q",required=false)
                                                                                 String queryString,
                                                                                 @RequestParam(value="inheritance",defaultValue="false",required=false)
                                                                                 boolean inheritance)
      • setPermission

        @PatchMapping("{typeId}/{objectId}")
        public org.springframework.http.ResponseEntity setPermission​(@PathVariable("typeId")
                                                                     String typeId,
                                                                     @PathVariable("objectId")
                                                                     String identifier,
                                                                     @RequestBody
                                                                     SetObjectPermissionRequest request)
      • setTypePermissions

        @PatchMapping("{typeId}")
        public org.springframework.http.ResponseEntity setTypePermissions​(@PathVariable("typeId")
                                                                          String typeId,
                                                                          @RequestBody
                                                                          SetTypePermissionsRequest request)
      • createPermissions

        @PostMapping("{typeId}")
        public org.springframework.http.ResponseEntity<Object> createPermissions​(javax.servlet.http.HttpServletRequest request,
                                                                                 @PathVariable("typeId")
                                                                                 String typeId,
                                                                                 @RequestBody
                                                                                 SetTypePermissionsRequest setTypePermissionsRequest)
      • createPermission

        @PostMapping("{typeId}/{objectId}")
        public org.springframework.http.ResponseEntity<Object> createPermission​(javax.servlet.http.HttpServletRequest request,
                                                                                @PathVariable("typeId")
                                                                                String typeId,
                                                                                @PathVariable("objectId")
                                                                                String identifier,
                                                                                @RequestBody
                                                                                SetObjectPermissionRequest setIdentityPermissionRequest)
      • deletePermission

        @DeleteMapping("{typeId}/{objectId}")
        public org.springframework.http.ResponseEntity deletePermission​(@PathVariable("typeId")
                                                                        String typeId,
                                                                        @PathVariable("objectId")
                                                                        String identifier,
                                                                        @RequestBody
                                                                        DeletePermissionRequest request)