Module GateKeeper::ClassMethods
In: lib/gate_keeper.rb

GateKeeper::ClassMethods are automatically mixed into all ActiveRecord classes.

Methods

Public Instance methods

Returns true if User.current has permission to create instances of base class.

[Source]

     # File lib/gate_keeper.rb, line 124
124:     def creatable?; return crudable?; end
createable?()

Alias for creatable?

Returns true if User.current has full CRUD permissions on all instances of base class.

[Source]

     # File lib/gate_keeper.rb, line 120
120:     def crudable?; return !GateKeeper.enabled?; end

When set in the User class, allows users to commit virtual suicide. You probably do NOT want to set this, but it‘s here anyway.

[Source]

     # File lib/gate_keeper.rb, line 145
145:     def destroyable_by_self; chain_self_method(:destroyable); end

When set in the User class, allows users to read themselves. You‘ll probably want to set either readable_by_all or readable_by_self for users, otherwise they‘ll have dificulty even logging in.

[Source]

     # File lib/gate_keeper.rb, line 136
136:     def readable_by_self; chain_self_method(:readable); end

When set in the User class, allows users to update their own records.

[Source]

     # File lib/gate_keeper.rb, line 140
140:     def updatable_by_self(opts = {}); chain_self_method(:updatable,opts); end
updateable_by_self(opts = {})

Alias for updatable_by_self

[Validate]