SpringBoot (14) Let's start (2/10). Defining users

0. Introduction 

The users' definition is in the file src/main/resources/config/menus/users.yml

The fields used are:

  1. id
  2. name
  3. surname1
  4. surname2
  5. document: The DNI or any other
  6. specialRoles: A list of roles for instance [ADMIN, TERCERS, TERRIRORI ]
  7. lAccess: a list of menus asnd access level. The fields of this elements are:
    1. idMenu: id of the menu whose access level is referred.
    2. accessLevel: access level assigned to the userfrom 1 to 6 as shown in the previous post
Here is an example with 2 users:


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
users:
  users:
  #--- Negociats: Nivell 0
    - { id: 1, name: Joan, surname1: Perez, surname2: Perez,   document: 12345678K, specialRoles: [ ADMIN, TERCERS ],
        lAccess: [ {idMenu: 1, accessLevel: 6}, {idMenu: 2 ,accessLevel: 6}, {idMenu: 3 ,accessLevel: 6}, {idMenu: 6 ,accessLevel: 6}, {idMenu: 8 ,accessLevel: 6} ] 
      }
    - { id: 2, name: Pere,  surname1: Lopez,    surname2: Lopera,      document: 11111111S, specialRoles: [ SECRETARI ],     
        lAccess: [ {idMenu: 1, accessLevel: 6}, {idMenu: 2, accessLevel: 6} ] 
      }       
   
 

Comentarios

Entradas populares de este blog

SpringBoot (6) Spring Data JPA (1)

SpringBoot (10) Authentication (1). Server certificate, application.yml and Application.java

Spring Boot (2) Websockets. Subscriptions of only one member