requesting for initial review for https://github.c...
# spicedb
k
requesting for initial review for https://github.com/authzed/spicedb/pull/2465, the deprecation support now looks like
Copy code
use deprecation

definition user {}
definition superuser {}
definition anotheruser {}

definition platform {
    relation admin: user
    relation editor: superuser

    @deprecated(warn, “rel viewer is deprecated”)
    relation viewer: anotheruser
}

@deprecated(error, user, “user object is deprecated”)
@deprecated(warn, platform#editor, “this to deprecate a relation under a namespace”)
This adds support for deprecating relation inside a definition namespace for marking the immediate next relation as deprecated, for outside a namespace a relation can be marked deprecated as
@deprecated(warn, platform#editor, “this to deprecate a relation under a namespace”)
and an object by simply changing the relation with the object, example platform#editor -> user will mark user as deprecated, it works if the object is either defined as a subject or a resource in a WriteRelationship call. (also would migrate this pr to a new branch if this branch looks messy after too many rebases)
2 Views