Sha256: e9bce269e6fbd17449bc37aa9fb605052884a2947a43bb8c48b7f9766827865e

Contents?: true

Size: 297 Bytes

Versions: 12

Compression:

Stored size: 297 Bytes

Contents

class UserAdminLicense < License::Base
  def initialize name
    super
  end

  def enforce!
    can(:manage, User)
  end
end

class BloggingLicense < License::Base
  def initialize name
    super
  end
  
  def enforce!
    can(:read, Blog)
    can(:create, Post)
    owns(user, Post)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cancan-permits-0.3.0 lib/generators/permits/templates/licenses.rb
cancan-permits-0.2.9 lib/generators/permits/templates/licenses.rb
cancan-permits-0.2.8 lib/generators/permits/templates/licenses.rb
cancan-permits-0.2.7 lib/generators/permits/templates/licenses.rb
cancan-permits-0.2.5 lib/generators/permits/templates/licenses.rb
cancan-permits-0.2.3 lib/generators/permits/templates/licenses.rb
cancan-permits-0.2.2 lib/generators/permits/templates/licenses.rb
cancan-permits-0.2.1 lib/generators/permits/templates/licenses.rb
cancan-permits-0.1.4 lib/generators/permits/templates/licenses.rb
cancan-permits-0.1.3 lib/generators/permits/templates/licenses.rb
cancan-permits-0.1.2 lib/generators/permits/templates/licenses.rb
cancan-permits-0.1.1 lib/generators/permits/templates/licenses.rb