I'm working on a chat app with Meteor and I want to be able to ban people. I have Meteor accounts-ui installed but I don't really know where to go from there. Does anybody know how to set up a blacklist of some sort to ban people from my website?

有帮助吗?

解决方案

I've found this two packages on atmosphere, maybe they can help you to do what you want.

Roles: Role-based authorization, compatible with Meteor's built-in accounts packages. Includes example app, unit tests and online API docs.

Groups: Simple system for authorization groups.

其他提示

You can attach arbitrary data to a user object, so you could just set user.banned = false in Accounts.onCreateUser and check Meteor.user().banned server-side when someone sends a message. The hard part would be building an admin UI to ban a specific user; there isn't baked-in support yet for administrative backends, so you'd probably have to hardcode your own email address as an administrator and only show the admin UI if the current user has that email.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top