Code Monkey home page Code Monkey logo

Comments (5)

Siyfion avatar Siyfion commented on May 21, 2024 1

I would also agree that some form of hierarchical roles/permissions would be a great feature to have.

from meteor-roles.

alanning avatar alanning commented on May 21, 2024

Hi @sclausen,

Thanks for the suggestion. I think you can do this with the authorization package on atmosphere: https://atmospherejs.com/package/authorization

It is a fork by another user of roles so you should be able to get up and going quickly.

I'll try to get in touch with the author and see if there's interest in remerging back into roles.

from meteor-roles.

Vadorequest avatar Vadorequest commented on May 21, 2024

I just run into Meteor and I'm wondering what should I choose between your package or the authorization package, they look the same, authorization beeing based on yours. But it hasn't been updated for 3 months and I don't really see what the differences are!

How is your package better than authorization?
Thanks!

from meteor-roles.

alanning avatar alanning commented on May 21, 2024

Both packages let you assign permissions to users.

The authorization package is based off an earlier version of this package and adds the ability to "nest" permissions in a hierarchy. Not sure if it can handle trees of an arbitrary depth or just two levels. So you could have an "admin" permission and nest permissions under it like "manage-users", "view-secrets", etc. then assign the "admin" permission to a user and they auto-get the others. At least that's my understanding.

If that sounds useful for your use case and you don't need the more recent updates to this package (see commit history since fork) then go for authorization.

If you need the latest roles features, you can accomplish something similar with its flat hierarchy by checking for multiple roles:

Roles.isUserInRole(userId, ['admin', 'manage-users'])

But you'll have to update those checks if you want to change the default of what 'admin' means so it's not quite as convenient.

A word of caution, I've found that using a permission hierarchy sounds nice in the beginning but it tends to break down in real life. There's always exceptions and it causes confusion if users are managing any of that themselves. If it's more of an internal use only thing then you should be fine.

On Jul 20, 2014, at 8:44 AM, Vadorequest [email protected] wrote:

I just run into Meteor and I'm wondering what should I choose between your package or the authorization package, they look the same, authorization beeing based on yours. But it hasn't been updated for 3 months and I don't really see what the differences are!

How is your package better than authorization?
Thanks!


Reply to this email directly or view it on GitHub.

from meteor-roles.

Vadorequest avatar Vadorequest commented on May 21, 2024

Okay, thanks for the answer, I mostly wanted to know the differences between both, I prefer use something maintained anyway. I don't need nested permissions neither.

from meteor-roles.

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.