Skip to content

Commit

Permalink
add desc to special perms
Browse files Browse the repository at this point in the history
  • Loading branch information
Wassim-Rached committed Oct 23, 2024
1 parent ac72fe1 commit 4561aba
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.example.usermanagement.exceptions.InputValidationException;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

Expand All @@ -13,6 +15,8 @@
@Data
@Table(name = "permissions")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Permission {

@Id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,18 @@ public void run(ApplicationArguments args) {
// create special permissions

var permissions = List.of(
new Permission("special.perm.verified_email"),
new Permission("special.perm.membership"),
new Permission("special.perm.verified_identity")
Permission.builder()
.scope("special")
.name("perm.verified_email")
.description("This permission is granted to accounts with verified email").build(),
Permission.builder()
.scope("special")
.name("perm.membership")
.description("This permission is granted to accounts with membership").build(),
Permission.builder()
.scope("special")
.name("perm.verified_identity")
.description("This permission is granted to accounts with verified identity").build()
);

// check if the permissions already exist
Expand Down

0 comments on commit 4561aba

Please sign in to comment.