[PATCH 1 of 2 jsonschema] Move permission check logic from get_entities() view to the resource

Philippe Pepiot philippe.pepiot at logilab.fr
Wed Jun 20 11:23:26 CEST 2018


On 20/06/2018, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1529478222 -7200
> #      Wed Jun 20 09:03:42 2018 +0200
> # Node ID 52dcc1f1a1439b0c0019646b4172fe94644b9788
> # Parent  62934d2097acdbbe04182b6070b7e87ac6549dbe
> # Available At https://hg.logilab.org/review/cubicweb-jsonschema
> #              hg pull https://hg.logilab.org/review/cubicweb-jsonschema -r 52dcc1f1a143
> # EXP-Topic resources-interfaces
> Move permission check logic from get_entities() view to the resource
> 
> Instead of assuming that the context resource in get_entities() view has
> an "etype" attribute (which won't be true anymore in next changeset), we
> delegate permission check to the resource object in the form of an
> has_perm() method. This is step towards defining abstract interfaces for
> resource classes.

Series applied, thanks!


More information about the cubicweb-devel mailing list