Class: SharingInstallerController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- SharingInstallerController
show all
- Includes:
- SharingPluginHelper
- Defined in:
- app/controllers/sharing_installer_controller.rb
Constant Summary
collapse
- APP_CONFIG =
Load configuration items (MANDATORY, must be included)
HashWithIndifferentAccess.new(YAML.load(File.read(File.expand_path('../../../config/sharing/sharing_config.yml', __FILE__))))
Instance Method Summary
collapse
#current_user, #get_current_user_role
Instance Method Details
#before_process ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
|
# File 'app/controllers/sharing_installer_controller.rb', line 11
def before_process
if (@curUserRole == 'contentadmin' ||
@curUserRole == 'user' ||
@curUserRole == 'loggedin' ||
@curUserRole == 'anonymous')
raise 'unauthorized access'
end
render :json => { :status => 'unimplemented' }
end
|
#core_process ⇒ Object
23
24
25
|
# File 'app/controllers/sharing_installer_controller.rb', line 23
def core_process
render :json => { :status => 'unimplemented' }
end
|
#post_process ⇒ Object
27
28
29
|
# File 'app/controllers/sharing_installer_controller.rb', line 27
def post_process
render :json => { :status => 'unimplemented' }
end
|
#uninstall ⇒ Object
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'app/controllers/sharing_installer_controller.rb', line 31
def uninstall
begin
if (@curUserRole == 'contentadmin' ||
@curUserRole == 'user' ||
@curUserRole == 'loggedin' ||
@curUserRole == 'anonymous')
raise 'unauthorized access'
end
render :json => { :status => 'success' }
rescue
render :json => { :status => 'failure' }
end
end
|