-
Notifications
You must be signed in to change notification settings - Fork 41
/
system_controller.rb
61 lines (48 loc) · 1.45 KB
/
system_controller.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright (C) 2009 Pascal Rettig.
class Manage::SystemController < CmsController # :nodoc: all
permit ['system_admin','client_admin']
layout 'manage'
def index
cms_page_info("System Configuration",'system')
@subpages = [
[ "Translation", :system_admin, "system_translation.png",
{ :controller => '/manage/translate' },
"Translate the backend interface"
],
[ "Clients", :system_admin, "system_clients.png",
{ :controller => '/manage/clients'},
"Configure the client accounts on the system"
],
[ "Client\nUsers", :client_admin, "system_client_users.png",
{ :controller => '/manage/users' },
"Manage client level users"
],
[ "Domains", :client_admin, "system_domains.png",
{ :controller => '/manage/domains' },
"View domains and edit options and components"
],
[ "Issue Tracker", :system_admin, "system_issue_tracker.png",
{ :controller => '/manage/issues' },
"View issues that the system has reported"
]
]
@client_user = self.client_user
render :action => 'index'
end
module Base
def client
myself.client
end
def client_user
myself.client_user
end
def system_admin?
self.client_user.system_admin?
end
def client_admin?
self.system_admin? || self.client_user.client_admin?
end
end
protected
include Base
end