permissions.proto 826 B

123456789101112131415161718192021222324252627282930313233
  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. // - role.assign
  18. // - role.view
  19. // - role.manage
  20. // - admin.view-system
  21. // - admin.view-audit
  22. // - user.manage-permissions
  23. //
  24. // Clients should ignore unknown keys so servers can add capabilities over time.
  25. message CapabilityGrant {
  26. // Stable capability key, such as "admin.view" or "dm.start".
  27. string capability = 1;
  28. // Whether the capability is currently available.
  29. bool granted = 2;
  30. }