-
Notifications
You must be signed in to change notification settings - Fork 0
Super simple (aka stupid) white/black list manager
License
littlemove/doorman
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Doorman ======= Doorman it's a super simple (aka stupid) white/black list manager. Doorman acts different depending on the kind of list you're asking: If you ask if somenthing could pass based on the whitelist it would let throught only entities present on the whitelist. If you ask if somenthing could pass based on the blacklist it would let throught everything except for entities present on the blacklist. You'll define those list on a yaml file like this: white: [[email protected], .*@simplelogica.net] black: [[email protected], .*@comunistasnazis.net] It allows ruby regular expresions as shown. Configuration ============= For Rails projects: config.gem 'doorman' Doorman::CONFIG_FILE_PATH = "path-to-your-yml" Example ======= Doorman::Whitelist.come_in?('[email protected]') # => true Doorman::Whitelist.come_in?('[email protected]') # => true Doorman::Whitelist.come_in?('[email protected]') # => false Doorman::Blacklist.come_in?('[email protected]') # => true Doorman::Blacklist.come_in?('[email protected]') # => true Doorman::Blacklist.come_in?('[email protected]') # => false Doorman::Blacklist.come_in?('[email protected]') # => false I think you've got the idea. Copyright (c) 2009 Diego Fernández, released under the MIT license
About
Super simple (aka stupid) white/black list manager
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published