dtolabs / yana2

Yet Another Node Authority ... because you wanted an agile Real-Time Service Model (RTSM)
8 stars 1 forks source link

Return 403 code for NodeType delete when Nodes/TemplateAttributes exist #132

Closed ahonor closed 12 years ago

ahonor commented 12 years ago

Currently, NodeTypes that have associated TemplateAttributes or Nodes cannot be deleted. When a user attempts it via the API, the current response is a 500 response code and error page.

For API users, a 403 (Forbidden) should be the generated response code.

Additionally, the delete method might formalize this check in a method of its own.