Sha256: 2cadcc9b59902c9ec747fe29a9f5eac6d80edb999763e8405a7547b2fb16ec23

Contents?: true

Size: 1.14 KB

Versions: 3

Compression:

Stored size: 1.14 KB

Contents

class SharingInstallerController < ApplicationController
  include SharingPluginHelper

  layout false

  before_filter :get_current_user_role

  # Load configuration items (MANDATORY, must be included)
  APP_CONFIG = HashWithIndifferentAccess.new(YAML.load(File.read(File.expand_path('../../../config/sharing/sharing_config.yml', __FILE__))))

  def before_process
    # Check access
    if (@curUserRole == 'contentadmin' ||
        @curUserRole == 'user' ||
        @curUserRole == 'loggedin' ||
        @curUserRole == 'anonymous')
      raise 'unauthorized access'
    end

    render :json => { :status => 'unimplemented' }
  end

  def core_process
    render :json => { :status => 'unimplemented' }
  end

  def post_process
    render :json => { :status => 'unimplemented' }
  end

  def uninstall
    begin
      # Check access
      if (@curUserRole == 'contentadmin' ||
          @curUserRole == 'user' ||
          @curUserRole == 'loggedin' ||
          @curUserRole == 'anonymous')
        raise 'unauthorized access'
      end

      render :json => { :status => 'success' }
    rescue
      render :json => { :status => 'failure' }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rxcms-sharing_plugin-0.4.0 app/controllers/sharing_installer_controller.rb
rxcms-sharing_plugin-0.3.0 app/controllers/sharing_installer_controller.rb
rxcms-sharing_plugin-0.2.0 app/controllers/sharing_installer_controller.rb