Comments (5)
I would also agree that some form of hierarchical roles/permissions would be a great feature to have.
from meteor-roles.
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.
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.
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.
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)
- _roles publication doesn't publish Meteor.roles in v3
- v2 - Roles._forwardMigrate() just removes all users from roles HOT 2
- API docs linked to old version of codes HOT 1
- getUsersInRole reactivity? HOT 1
- getScopesForUser is not in documentation HOT 1
- How to run migration script from V1 -> V3 HOT 3
- Exception on subscription: $in needs an array.
- Support new Meteor async API (Meteor 2.8+) HOT 2
- Defaut publication uses only user._id, but no index is created on that field only HOT 2
- cannot add data into role-assignment HOT 3
- Meteor.roleAssignment, error: Property 'roleAssignment' does not exist on type 'typeof Meteor'. HOT 5
- Weird issue with role-assignement.. HOT 2
- Upgrading from 3.4.0 to 3.5.0 introduces 6x node "UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'isCalledFromAsync' of undefined" warnings. HOT 1
- TypeError: Cannot set property 'isCalledFromAsync' of undefined ... HOT 4
- Improve community standards HOT 1
- Add code quality tools HOT 2
- Add selector to Roles.getUsersInRole HOT 2
- forwardMigrate2 tries to drop unset index HOT 1
- Add new function to change scope of existing role assignment HOT 1
- addRolesToParent -> Reset inheritance as unwanted roles may still be connected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-roles.