Sha256: 1127cd0b95b9a3efe85bee025a8cea4427738130466b935cf04e098987ecb360

Contents?: true

Size: 554 Bytes

Versions: 3

Compression:

Stored size: 554 Bytes

Contents

module Lanes
    module Access

        module Roles

            class Administrator < Role

                def self.grant_global_access!

                    self.grant( *Lanes::Model.descendants )

                    LockedFields.definitions.each do | klass, fields |
                        fields.each do |field, grants|
                            grants.push({ role: self, only: nil })
                        end
                    end
                end

                lock User, :password_digest
            end

        end

    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lanes-0.0.3 lib/lanes/access/roles/administrator.rb
lanes-0.0.2 lib/lanes/access/roles/administrator.rb
lanes-0.0.1 lib/lanes/access/roles/administrator.rb