Class: RailsEmbedEditor::Authorization

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_embed_editor/authorization.rb

Class Method Summary collapse

Class Method Details

.authorize!(user, *args) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/rails_embed_editor/authorization.rb', line 3

def self.authorize!(user, *args)
  case RailsEmbedEditor::Config.authorize_with
    when :cancan
      Ability.new(user).authorize!(*args)
    else
      true
  end
end