You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
952 B
26 lines
952 B
12 years ago
|
class Users::PermissionsController < UsersController
|
||
13 years ago
|
active_scaffold :permission do |conf|
|
||
13 years ago
|
conf.actions.exclude :show, :search
|
||
13 years ago
|
conf.columns = [:domain, :user, :user_email]
|
||
|
conf.list.columns = [:domain, :user, :user_email]
|
||
|
conf.create.columns = [:domain, :user_email]
|
||
|
conf.update.columns = [:domain, :user_email]
|
||
|
conf.columns[:user_email].form_ui = :virtual
|
||
13 years ago
|
conf.columns[:user_email].description = <<-DOC
|
||
|
User's email address, to share with. Ex. jhon.doe@domain.com .
|
||
|
The selected user will be able to administer this domain,
|
||
|
including it's records, it's subdomains and their records.
|
||
|
DOC
|
||
13 years ago
|
conf.create.link.label = 'Share Domain'
|
||
13 years ago
|
|
||
13 years ago
|
# conf.columns[:user_email].search_sql = 'user.email'
|
||
|
# conf.columns[:user].search_sql = 'CONCAT(first_name, ' ', last_name)'
|
||
13 years ago
|
end
|
||
|
before_filter :ensure_nested_under_domain
|
||
13 years ago
|
|
||
|
protected
|
||
|
|
||
|
def beginning_of_chain
|
||
|
super.readonly(false)
|
||
|
end
|
||
13 years ago
|
end
|