Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-2786

Propagate the javax.annotation.security annotations in REST Data

XMLWordPrintable

      With these changes, the REST Data with Panache extension will propagate the Security annotations within the package `javax.annotation.security` that are defined on your resource interfaces:

      ```java
      import javax.annotation.security.DenyAll;
      import javax.annotation.security.RolesAllowed;

      @DenyAll
      @ResourceProperties
      public interface PeopleResource extends PanacheEntityResource<Person, Long>

      { @RolesAllowed("superuser") boolean delete(Long id); }

      ```

      Additionally, if you are only interested in specifying the roles that are allowed to use the resources, the `@ResourceProperties` and `@MethodProperties` annotations have the field `rolesAllowed` to list the security roles permitted to access the resource or operation.

      Fix https://github.com/quarkusio/quarkus/issues/28995

              Unassigned Unassigned
              probinso_jira Quarkus JIRA Bot
              Fedor Dudinskii Fedor Dudinskii
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: