Giter VIP home page Giter VIP logo

Comments (3)

stalniy avatar stalniy commented on July 2, 2024

There is a bug with create in this repo. It was discussed in the comments of the article on medium. To restrict find you need to restrict read operation. I will try to help you when a bit later as currently I don't have my laptop

Meanwhile you can check example for Expressjs app. You can find it in my repos on GitHub

from casl-feathersjs-example.

elixiao avatar elixiao commented on July 2, 2024

@stalniy thanks for your reply. restrict read doesn't work for me either, but I found a workaround to return empty array for unauthorized request:

can('find', 'posts', {notExistField: true})

I couldn't find a workaround for method create. Hope fix it soon, thanks again for your excellent casl repo.

from casl-feathersjs-example.

stalniy avatar stalniy commented on July 2, 2024

@elixiao I pushed a fix for this issues. There is a bit better way to restrict collection for read by using $limit = 0. I put my thoughts on this topic in comments.

Update: please check and close the issue if everything is ok :)

from casl-feathersjs-example.

Related Issues (7)

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.