forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkusio#42809 from michalvavrik/feature/test-sec…
…urity-permissions Add support for string permissions to @testsecurity annotation
- Loading branch information
Showing
5 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...ron-resteasy/src/main/java/io/quarkus/it/resteasy/elytron/BeanSecuredWithPermissions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.quarkus.it.resteasy.elytron; | ||
|
||
import jakarta.enterprise.context.ApplicationScoped; | ||
|
||
import io.quarkus.security.PermissionsAllowed; | ||
|
||
@ApplicationScoped | ||
@PermissionsAllowed({ "see:detail", "see:all" }) | ||
public class BeanSecuredWithPermissions { | ||
|
||
public String getDetail() { | ||
return "detail"; | ||
} | ||
|
||
@PermissionsAllowed("create:all") | ||
public String create() { | ||
return "created"; | ||
} | ||
|
||
@PermissionsAllowed("modify") | ||
public String modify() { | ||
return "modified"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters