Role_Based_Permissions

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

  • + 404 Xu Li 11 months ago
    Many thanks for sharing your experience with us.
Post a comment
Embed Video
Edit your comment Cancel

2 Favorites

Role_Based_Permissions - Presentation Transcript

  1. Role Based Permissions Ruby on Rails way Eric Sun 7/26/2008
  2. Why Roles?
  3. Why Permissions?
  4. Why Role based ? Manager (Role) James Add Adan Edit John Del
  5. UML Dialog
  6. Programming way >>> Role.new({ :identifier => 'roles.admin' }).save!  >>> StaticPermission.new({ :identifier => 'permissions.all' }) .save! >>> user = User.new >>> user.save!  >>> user.roles << Role.find_by_identifier('roles.admin')  >>> user.has_role?('roles.admin') => true  >>> user.has_permission?('permissions.all', 'foo') => true  >>> user.has_permission?('foo')

+ wearwear, 11 months ago

custom

745 views, 2 favs, 0 embeds more stats

More Info

© All Rights Reserved

Go to text version
  • Total Views 745
    • 745 on SlideShare
    • 0 from embeds
  • Comments 1
  • Favorites 2
  • Downloads 29
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as innappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

Categories