google/CodeCity

Implement permissions checks in Interpreter

Opened this issue · 1 comments

Tracking bug for implement permissions checks in the server Interpreter.

Prerequisites:

  • Finalise Permissions Model #392.
  • Rewrite core classes to use WeakMaps #404.

To Do:

  • Implement controls() or similar.
  • Implement object mutability limits (only mutable by controllers(s)).
  • Implement normal property writability limits (only writable by controller(s)).

Later:

  • Implement object readability attribute? (Needed to protect $.userDatabase keys.)
  • Implement property readable attribute or similar?
  • Implement property heritable attribute or similar.

We could just hide all the sensitive information in $.userDatabase inside a closure. We'd need to have a way (for sufficiently authorised users) to extract the information manually so it could restored after a dump/reload, but that would obviate the immediate need for non-readable objects, AFAICT.