Class: EngineController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- EngineController
- Includes:
- PluginHelper
- Defined in:
- app/controllers/engine_controller.rb
Constant Summary collapse
- APP_CONFIG =
Load configuration items (MANDATORY, must be included)
HashWithIndifferentAccess.new(YAML.load(File.read(File.('../../../config/podio/podio_config.yml', __FILE__))))
Instance Method Summary collapse
- #configure ⇒ Object
-
#index ⇒ Object
Write your readme here.
- #installer ⇒ Object
Methods included from PluginHelper
#current_user, #get_current_user_role
Instance Method Details
#configure ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/controllers/engine_controller.rb', line 20 def configure if (@curUserRole == 'contentadmin' || @curUserRole == 'user' || @curUserRole == 'anonymous' || @curUserRole == 'loggedin') raise 'unauthorized access' end if request.xhr? respond_to do |t| t.html end else raise 'unauthorized access' end end |
#index ⇒ Object
Write your readme here
16 17 18 |
# File 'app/controllers/engine_controller.rb', line 16 def index end |
#installer ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'app/controllers/engine_controller.rb', line 37 def installer if (@curUserRole == 'contentadmin' || @curUserRole == 'user' || @curUserRole == 'anonymous' || @curUserRole == 'loggedin') raise 'unauthorized access' end if request.xhr? respond_to do |t| t.html end else raise 'unauthorized access' end end |