HAALCENTRAAL English translation
BRP API / Personen / Features / gegeven-stap-definities-autorisatie

Authorization Given step definitions

# language: en
@stap-documentatie
Feature: Authorization Given step definitions

  Scenario: Given the consumer with indication '[indicatie]' has the following 'autorisatie' data
    Given the consumer with indication '000008' has the following 'autorisatie' data
      | Rubrieknummer ad hoc (35.95.60) |
      |                     10120 10210 |
    Then the generated SQL statements are
      | stap | categorie   | text                                                                                                                                                                                                                               | values                 |
      |    1 | autorisatie | INSERT INTO public.lo3_autorisatie(autorisatie_id,afnemer_code,geheimhouding_ind,verstrekkings_beperking,ad_hoc_rubrieken) VALUES((SELECT COALESCE(MAX(autorisatie_id), 0)+1 FROM public.lo3_autorisatie),$1,$2,$3,$4) RETURNING * | 000008,0,0,10120 10210 |

  Scenario: Given the consumer with indication '[indicatie]' is authorized for 'adressering binnenland' data
    Given the consumer with indication '000008' is authorized for 'adressering binnenland' data
    Then the generated SQL statements are
      | stap | categorie   | text                                                                                                                                                                                                                                                                                                                      | values                                                                                                                                      |
      |    1 | autorisatie | INSERT INTO public.lo3_autorisatie(autorisatie_id,afnemer_code,geheimhouding_ind,verstrekkings_beperking,afnemer_naam,adres_vraag_bevoegdheid,ad_hoc_medium,tabel_regel_start_datum,ad_hoc_rubrieken) VALUES((SELECT COALESCE(MAX(autorisatie_id), 0)+1 FROM public.lo3_autorisatie),$1,$2,$3,$4,$5,$6,$7,$8) RETURNING * | 000008,0,0,Haal Centraal,1,N,20201128,10120 10240 10310 80910 81110 81120 81130 81140 81180 81190 PANM03 PANM04 PANM05 PANM06 PAVP03 PAVP04 |

  Scenario: Given the consumer with indication '[indicatie]' is authorized for 'verblijfplaats binnenland' data
    Given the consumer with indication '000008' is authorized for 'verblijfplaats binnenland' data
    Then the generated SQL statements are
      | stap | categorie   | text                                                                                                                                                                                                                                                                                                                      | values                                                                                                                                |
      |    1 | autorisatie | INSERT INTO public.lo3_autorisatie(autorisatie_id,afnemer_code,geheimhouding_ind,verstrekkings_beperking,afnemer_naam,adres_vraag_bevoegdheid,ad_hoc_medium,tabel_regel_start_datum,ad_hoc_rubrieken) VALUES((SELECT COALESCE(MAX(autorisatie_id), 0)+1 FROM public.lo3_autorisatie),$1,$2,$3,$4,$5,$6,$7,$8) RETURNING * | 000008,0,0,Haal Centraal,1,N,20201128,10120 81010 81030 80910 81110 81115 81120 81130 81140 81150 81160 81170 81180 81190 81210 88510 |

  Scenario: Given the authenticated consumer has the following 'claim' data
    Given the authenticated consumer has the following 'claim' data
      | afnemerID | gemeenteCode |
      |    000008 |         0800 |
    Then the scenario context has a property 'afnemerID' with value '000008'
    And the scenario context has a property 'gemeenteCode' with value '0800'

  @integratie
  Scenario: a new consumer with indication '[afnemer code]' is authorized to request '[fields]'
    Given a new consumer with indication '000008' is authorized to request 'gezag'
    When the SQL statements generated from the Given steps have been executed
    Then consumer '000008' has the following row in table 'lo3_autorisatie'
      | afnemer_code | geheimhouding_ind | verstrekkings_beperking | afnemer_naam  | adres_vraag_bevoegdheid | ad_hoc_medium | tabel_regel_start_datum | ad_hoc_rubrieken   |
      |       000008 |                 0 |                       0 | Haal Centraal |                       1 | N             |                20201128 | 10120 81180 PAGZ01 |

  @integratie
  Scenario: an existing consumer with indication '[afnemer code]' is authorized to request '[fields]'
    Given an existing consumer with indication '000009' is authorized to request 'gezag'
    When the SQL statements generated from the Given steps have been executed
    Then consumer '000009' has the following row in table 'lo3_autorisatie'
      | afnemer_code | geheimhouding_ind | verstrekkings_beperking | afnemer_naam  | adres_vraag_bevoegdheid | ad_hoc_medium | tabel_regel_start_datum | ad_hoc_rubrieken   |
      |       000009 |                 0 |                       0 | Haal Centraal |                       1 | N             |                20201128 | 10120 81180 PAGZ01 |