How to create admin users?


#1

This sound very easy but i dont know how to approach this. i create a blog where im able to create “regular” user registration. they can add blog post and comment. and then i want to create admin. who cant delete/edit the regular user’s post… i used. meteor add accounts-password package


#2

Meteor doesn’t have a built in roles/permissions system, that’s up to you.

You could just do something like Meteor.users.update(userId, {$set:{admin:true}})
or Meteor.users.update(userId, {$set:{role:'admin'}})
or Meteor.users.update(userId, {$set:{permissions:['editUsers','editPosts']}})
And then you check those fields.


#3

thank you sir. so to make a admin user. i need to manually do it in the back end.


#4

https://atmospherejs.com/alanning/roles


#5

@copleykj thank you! its easy to use! btw is there a way to configure the meteor accout ui:password ?


#6

This may be what you are looking for…


#7

@copleykj thank you again!