TBD54566975 / dwn-server

DWN server - host anywhere publicly accessible for DIDs to use
Apache License 2.0
41 stars 43 forks source link

Allowing a role assignment that allows role assignment #174

Closed sondreb closed 4 days ago

sondreb commented 6 days ago

With this feature, I could give an "employee" the rights to give other employees permissions. The alternative is to host the private key of the DWN on a server and build a custom permission-management API for this purpose.

sondreb commented 4 days ago

I think maybe this is already possible, by adding an actions section under the role, right? I did a quick verification, and I think it's possible.

Something like this:

  structure: {
    globalAdmin: {
      $role: true,
      $actions: [
        {
          role: 'globalAdmin',
          can: ['create', 'read', 'update', 'query', 'subscribe', 'co-update', 'co-delete'],
        },
      ],
    },