Improve selection of rules
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 24 Oct 2019 07:10:47 +0000 (09:10 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 24 Oct 2019 07:10:47 +0000 (09:10 +0200)
commit6b5d5750a179def14ed48f1700aaefd5e5b0e059
treec4183678dc71578fb74a22a07eb1cf35505777e0
parent63c147739eec0322981ee9a5541786288d57bbce
Improve selection of rules

Now the rule to apply is given by the laws:

  1. The rules that matches exactly more keys
  2. If law 1 apply to more than one rule, the select rule is the one
     matches more exactly the keys in the following order of priority:
      - session
      - user
      - client
      - permission

Change-Id: Ia5ae241a08c5a58f75ca0a0c73fcda0876008cc1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/anydb.c