-
Notifications
You must be signed in to change notification settings - Fork 0
rawhide/role_manager
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Usage ===== 要 ActionController#current_user rails g role_manager:install user rake db:migrate Example ======= class User < ActiveRecord::Base acts_as_role include RoleMangerMethods end user = User.new user.has_authority? :register #=> true/false class FooController < ActionController::Base role_filter :destroy #=> 全アクション role_filter :register, :only => 'index' #=> indexアクションのみ end # Roleに対してFuncの権限を与える r = RoleManager::Role.first r.add_authority RoleManager::Function.first.code r.save # UserにRoleを与える u.role = r u.save
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published