Giter VIP home page Giter VIP logo

Comments (3)

aarcro avatar aarcro commented on August 30, 2024

...Actually the one use of default False available_permissions is that they will be removed when the old role is removed by assign_role_to_user which might not actually be expected.

from django-role-permissions.

filipeximenes avatar filipeximenes commented on August 30, 2024

The change from having UserRole to using Groups was due to feedbacks I got from other people.

For the sake of simplicity, I assumed Groups would only be used for managing roles, and that's why all user groups are deleted before a new one is assigned. Your approach is more correct, this library should not interfere with Groups beyond the ones it creates.

About available_permissions, they do limit permissions that can be applied. You are supposed to be using grant_permission and revoke_permission to manage then. This methods will check if they are valid for the user role. When you change users Role, the library assumes it is a fresh start on the new Role and that's why all permissions are deleted and rebuild according to the new role. Maybe all this should be better documented. I'll open an issue :)

Can you make a PR for your changes?

from django-role-permissions.

filipeximenes avatar filipeximenes commented on August 30, 2024

It's ready on pypi as version 0.6

from django-role-permissions.

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.