TODO: Write a gem description
Add this line to your application's Gemfile:
gem 'rds-permissions'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rds-permissions
config api endpoint by adding this line:
Rds::Permissions::Config.api_endpoint = "http://rds-users.smartsoftasia.com/api/v1/authorization/authorize"
Include rds-permissions in ActionController :
include Rds::Permissions
In action methods :
def show
require_permissions!( :users_read )
end
or:
def show
if require_permissions?( :users_read, :users_manage )
..do something...
end
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request