Skip to content

Instantly share code, notes, and snippets.

@pcmantz
Created October 26, 2012 17:00
Show Gist options
  • Save pcmantz/3959920 to your computer and use it in GitHub Desktop.
Save pcmantz/3959920 to your computer and use it in GitHub Desktop.
class GuestRolePermit < CanTango::RolePermit
def initialize ability
super
end
protected
def permit_rules
can(:read, [PackageManager, Package, Bundle]) { public_at.present? }
end
module Cached
def permit_rules
end
end
module NonCached
def permit_rules
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment