TanmoySG / wunderDB

A micro JSON-based Data Store inspired by MongoDB.
http://wdb.tanmoysg.com/api/
Apache License 2.0
12 stars 0 forks source link

[Optimization ⚙️] Fix how roles are granted to users #26

Open TanmoySG opened 1 year ago

TanmoySG commented 1 year ago

Currently when a role is granted it is stored in an Array as

{
  "permissions":[
    {
      "role":"roleTwo",
      "on":{
        "databases":"test-db-001"
      }
    },
    {
      "role":"roleOne",
      "on":{
        "databases":"*"
      }
    }
  ]
}

So without looping through all existing permissions, there is no way to check is if permissions are being duplicated.

[Add more details]

TanmoySG commented 1 year ago

Moving to Iteration 13 (starts march end). Will introduce as feature/enhancement.