Owning

io.eezo.auth.Owning
final class Owning[A, U]

An ownership declaration waiting to be told which routes it covers.

The chain ends in one of three, and the three read as what they are: all for a model nobody but its owner may even see, except for one whose reading routes are everybody's, only for the odd shape neither of those describes. There is no default, because "which routes does owning a row decide" has no safe silence: covering everything makes a blog's index private, and covering nothing makes the declaration do nothing at all.

These are not io.eezo.http.Guarded's only and except under another name, and the difference is worth saying twice. There the question is who has to be signed in. Here every covered route already needs a signed in user, and the question is which of them are narrowed to that user's own rows.

Attributes

Source
Owning.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def all: Owned[A, U]

Every route reads and writes this user's rows alone. A cart, a draft, a private note.

Every route reads and writes this user's rows alone. A cart, a draft, a private note.

Attributes

Source
Owning.scala
def except(actions: Action*): Owned[A, U]

Everything but these is the owner's, which is the blog's shape: everybody reads, each edits their own.

Everything but these is the owner's, which is the blog's shape: everybody reads, each edits their own.

Attributes

Source
Owning.scala
def only(actions: Action*): Owned[A, U]

Exactly these routes are the owner's; the rest read the whole table.

Exactly these routes are the owner's; the rest read the whole table.

Attributes

Source
Owning.scala