Git Product home page Git Product logo

core's People

Contributors

aimeos avatar ashk2a avatar jazo avatar lindyhopchris avatar x-coder264 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

core's Issues

Authorizer contract needs separate methods for show-related and show-relationship actions

public function showRelationship(Request $request, object $model, string $fieldName): bool;

lets assume we have a companySchema and branchSchema and they have a m-t-m relationship
lets also assume that a user has permission to 'index', 'show', 'showRelationship' of the branchSchema but does not have any permissions to the companySchema using the Authorizer.

if that user used the url: domain.com/api/v1/branches/{branch_id}/companies he will be able to see the data of each company ?

Schema fields visibility

Hey,

Any chance the $fields property and allFields(), allAttributes(), allSortFields(), and allRelation() methods could be changed to protected.

I need to inject some dynamic fields into the Schema during Server::serving(), but fields are cached in the Schema earlier, during routing. Ideally I'd override allFields() to start caching after the dynamic fields have been injected.

More info: In my application I have a Schema which represents several user generated content types. This works by setting Schemas the uriType() to include a route variable for the type, and url() to generate the correct URL. The JsonApiResources type() returns a type congruent with the route variable.

I have two issues I'm trying to overcome. The first is the visibility mentioned above, and second I need to get the Spec\ResourceBuilder and Spec\RelationBuilder to handle the 'fake' type when given a document. I have something hacky working, but not sure it's the best approach. I'm basically mutating the JSON document just before it's created. Any ideas here would be awesome?

Cheers,

George

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.