Ultra lite authorization library
based on clear ruby it can be used for Rails applications or any other framework
gem install six4 steps:
create abilities object
abilities = Six.newcreate object/class with allowed method - here you'll put conditions to define abilities
class BookRules
def self.allowed(author, book)
[:read_book, :edit_book]
end
endAdd object with your rules to abilities
abilities BookRules) # same as Six.new & add(:book_rules, BookRules)abilities = Six.new(:book => BookRules, :auth => AuthRules, :managment => ManagerRules)
### Adding rules
```ruby
abilities = Six.new
# 1. simple (recommended)
# but you cant use abilities.use(:book_rules) to
# search over book namespace only
abilities more perfomance…No open issues yet, or sync has not completed.