Class: UserAdminLicense

Inherits:
License::Base show all
Defined in:
lib/generators/cancan/licenses/templates/user_admin_license.rb

Instance Attribute Summary

Attributes inherited from License::Base

#licenses, #permit

Instance Method Summary collapse

Methods inherited from License::Base

#can, #cannot, #load_rules, #owns

Constructor Details

#initialize(name) ⇒ UserAdminLicense

Returns a new instance of UserAdminLicense.



2
3
4
# File 'lib/generators/cancan/licenses/templates/user_admin_license.rb', line 2

def initialize name
  super
end

Instance Method Details

#enforce!Object



6
7
8
# File 'lib/generators/cancan/licenses/templates/user_admin_license.rb', line 6

def enforce!
  can(:manage, User)
end