permissions.proto 843 B

12345678910111213141516171819202122232425262728293031323334
  1. syntax = "proto3";
  2. package chatto.api.v1;
  3. // Effective decision for one permission key.
  4. message PermissionGrant {
  5. // Stable permission key, such as "server.manage".
  6. string permission = 1;
  7. // Whether the permission is currently granted.
  8. bool granted = 2;
  9. }
  10. // Effective decision for one capability key.
  11. //
  12. // Built-in keys currently include:
  13. // - admin.view
  14. // - dm.start
  15. // - admin.view-users
  16. // - user.manage-accounts
  17. // - user.invite
  18. // - role.assign
  19. // - role.view
  20. // - role.manage
  21. // - admin.view-system
  22. // - admin.view-audit
  23. // - user.manage-permissions
  24. //
  25. // Clients should ignore unknown keys so servers can add capabilities over time.
  26. message CapabilityGrant {
  27. // Stable capability key, such as "admin.view" or "dm.start".
  28. string capability = 1;
  29. // Whether the capability is currently available.
  30. bool granted = 2;
  31. }