Project

General

Profile

« Previous | Next » 

Revision acfbc458

Added by Marek Hulán about 10 years ago

fixes #812 - new permissions model, user group role and nest support, role filters for better granularity

Contributions from:

View differences:

app/models/parameters/host_parameter.rb
"#{host.id ? host.name : "unassociated"}: #{name} = #{value}"
end
private
def enforce_permissions operation
# We get called again with the operation being set to create
return true if operation == "edit" and new_record?
(auth = User.current.allowed_to?("#{operation}_params".to_sym)) and Host.my_hosts.include?(host)
errors.add(:base, _("You do not have permission to %s this domain") % operation) unless auth
auth
end
end

Also available in: Unified diff