Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where should functions like isAdmin go? #58

Open
JulianKingman opened this issue Apr 29, 2015 · 3 comments
Open

Where should functions like isAdmin go? #58

JulianKingman opened this issue Apr 29, 2015 · 3 comments

Comments

@JulianKingman
Copy link

I'm new to Meteoris, where should a function like isAdmin() go, which would check a user ID? Better yet, is this something that could be included in meteoris? Perhaps isRole('role', '_Id') would be better.

Thanks!

@radiegtya
Copy link
Owner

Hi Julian, I'll try to make some helpers about this. Btw for now You can easily check what role does an user have by checking it's Meteor.user.profile.mugenRoleGroupId, "1" mean admin, "2" mean authenticated user.

Regards

@JulianKingman
Copy link
Author

Thanks! How do I apply that to a particular user? I was also curious, in general, about where 'utility' functions like that would go, according to your folder convention.

@radiegtya
Copy link
Owner

@JulianKingman : have You seen my video tutorial about user roles? I think You can understand how to do that from there. If you want to deeply take a look about the code, you can look at mugen folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants