Skip to content

Commit

Permalink
docs: javax -> jakarta
Browse files Browse the repository at this point in the history
  • Loading branch information
mvysny committed Mar 9, 2023
1 parent 26acafe commit 7cb2f01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/guides/databases.md
Expand Up @@ -309,7 +309,7 @@ import com.github.vokorm.*
import com.gitlab.mvysny.jdbiorm.Dao
import org.hibernate.validator.constraints.*
import java.time.*
import javax.validation.constraints.*
import jakarta.validation.constraints.*

enum class MaritalStatus { Single, Married, Divorced, Widowed }

Expand Down
8 changes: 4 additions & 4 deletions docs/guides/security.md
Expand Up @@ -58,7 +58,7 @@ the admin user which will then create other users and assign the roles. We will
so that `OrdersView` can only be viewed by the `sales` users:

```kotlin
import javax.annotation.security.RolesAllowed
import jakarta.annotation.security.RolesAllowed

@Route("orders", layout = MainLayout::class)
@RolesAllowed("sales")
Expand All @@ -81,7 +81,7 @@ order in question belongs to the
currently logged-in user. We can't express this complex rule with annotations alone, hence we'll simply use Kotlin code to do that:

```kotlin
import javax.annotation.security.PermitAll
import jakarta.annotation.security.PermitAll

@PermitAll // since the currently logged-in user may not be from the "sales" group but may still see his order.
class OrderView : VerticalLayout(), BeforeEnterObserver {
Expand Down Expand Up @@ -304,10 +304,10 @@ The VoK API authorization API uses role-based authorization on Vaadin views. The
three annotations available,
and your view must list at least one of them otherwise it will be inaccessible:

* `javax.annotation.security.RolesAllowed` lists roles that are allowed to visit that view;
* `jakarta.annotation.security.RolesAllowed` lists roles that are allowed to visit that view;
the user must be logged in and must be assigned at least one of the roles listed in the annotation
* `com.vaadin.flow.server.auth.AnonymousAllowed` allows anybody to see this view, even if there is no user logged in.
* `javax.annotation.security.PermitAll` allows any logged-in user to see this view.
* `jakarta.annotation.security.PermitAll` allows any logged-in user to see this view.

These rules are quite simple and cover only the basic authorization needs. You can simply
define more complex rules as a Kotlin code in the `BeforeEnterObserver.beforeEnter()` function
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorial.md
Expand Up @@ -735,7 +735,7 @@ package com.example.vok
import com.github.vokorm.*
import com.gitlab.mvysny.jdbiorm.Dao
import org.hibernate.validator.constraints.Length
import javax.validation.constraints.NotNull
import jakarta.validation.constraints.NotNull

data class Article(
override var id: Long? = null,
Expand Down Expand Up @@ -1108,7 +1108,7 @@ package com.example.vok
import com.github.vokorm.*
import com.gitlab.mvysny.jdbiorm.Dao
import org.hibernate.validator.constraints.Length
import javax.validation.constraints.NotNull
import jakarta.validation.constraints.NotNull

data class Comment(
override var id: Long? = null,
Expand Down Expand Up @@ -1190,7 +1190,7 @@ import eu.vaadinonkotlin.vaadin10.*
import com.gitlab.mvysny.jdbiorm.Dao
import eu.vaadinonkotlin.vaadin10.vokdb.*
import org.hibernate.validator.constraints.Length
import javax.validation.constraints.NotNull
import jakarta.validation.constraints.NotNull

data class Article(
override var id: Long? = null,
Expand Down

0 comments on commit 7cb2f01

Please sign in to comment.