Revision acfbc458
Added by Marek Hulán about 10 years ago
app/helpers/hosts_and_hostgroups_helper.rb | ||
---|---|---|
end
|
||
|
||
def accessible_hostgroups
|
||
hg = (User.current.hostgroups.any? and !User.current.admin?) ? User.current.hostgroups.with_taxonomy_scope_override(@location,@organization) : Hostgroup.with_taxonomy_scope_override(@location,@organization)
|
||
hg = Hostgroup.with_taxonomy_scope_override(@location,@organization)
|
||
hg.sort{ |l, r| l.to_label <=> r.to_label }
|
||
end
|
||
|
||
... | ... | |
end
|
||
|
||
def accessible_domains
|
||
(User.current.domains.any? and !User.current.admin?) ? User.current.domains.with_taxonomy_scope_override(@location,@organization) : Domain.with_taxonomy_scope_override(@location,@organization)
|
||
Domain.with_taxonomy_scope_override(@location,@organization)
|
||
end
|
||
|
||
def domain_subnets(domain=@domain)
|
Also available in: Unified diff
fixes #812 - new permissions model, user group role and nest support, role filters for better granularity
Contributions from: