authorization over environment model

POST "/foreman/api/environments" {"environment"=>{"name"=>"production"} }

caused

    undefined method `permission_failed?' for #<Environment:0x7f978b2ff808>
    (NoMethodError)