Tweets by @markusgattol |
Git
Security
Meteor.users.profileAccounts.onCreateUser( function (options, user) { user.profile.roles = ["user"]; user.profile.karma = 0; user.profile.online = false; if ( options.profile ) user.profile = options.profile; return user; });
good talking right there! I agree and I will be doing it like this now as I think it's (at least for me) best practice
I also like the profile package https://github.com/BeDifferential/meteor-profile as I think a profile together with roles and groups gets you very far for a majority of use cases out there. It's also quite interesting the aha effect you get from reading the docs for a second time or third time even, especially when seeing nifty use of it throughout several packages... like for example the use of Accounts.validateNewUser() or Accounts.onCreateUser() are two functions which are incredibly cool once you grasp their power after you "see" all the possible use cases for them :) |