Giter VIP home page Giter VIP logo

Comments (8)

brunogaspar avatar brunogaspar commented on June 9, 2024

Are you trying to use the hasAccess method to determine if the user has the cus_prm role set?

Or are you using the hasAccess to determine if one of the roles permissions are allowed?

From what you wrote, seems the first one, but i don't know exactly what you're trying to achieve as the steps to reproduce is unclear.

from sentinel.

AjithGigsboard avatar AjithGigsboard commented on June 9, 2024

Or are you using the hasAccess to determine if one of the roles permissions are allowed?

yes.

the user have cus_prm and customer roles. I want to check if the cus_prm is allowed to access the team.index. team.show URI and customer not allowed to access the URIs

from sentinel.

brunogaspar avatar brunogaspar commented on June 9, 2024

Ok, i think the "issue" is that, if one of those permissions are denied, Sentinel will use those, which is by default.

You can change the behaviour, but you need to implement your permissions logic by creating a Permissions class and tell Sentinel to use it on the config file or at runtime (should work too) or set those specific permissions at user level.

Don't believe it's a bug or an issue, it's a design feature more or less for security.

from sentinel.

AjithGigsboard avatar AjithGigsboard commented on June 9, 2024

Ok. Understood. But It will be better if we can specify which role to be considered for checking the permission on the hasAccess method.

from sentinel.

brunogaspar avatar brunogaspar commented on June 9, 2024

Don't believe that's possible/doable on default behavior, you probably need to create your own logic for this.

from sentinel.

AjithGigsboard avatar AjithGigsboard commented on June 9, 2024

Okay.

from sentinel.

brunogaspar avatar brunogaspar commented on June 9, 2024

We are open to pull requests, so you're more than welcomed to submit a pull request that adds such functionality if you feel like it :)

from sentinel.

AjithGigsboard avatar AjithGigsboard commented on June 9, 2024

We are open to pull requests, so you're more than welcomed to submit a pull request that adds such functionality if you feel like it :)

Okay

from sentinel.

Related Issues (20)

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.