← Back to team overview

dhis2-devs team mailing list archive

[Bug 331932] Re: No right to delete object + associated objects exist gives XML parser error

 

** Description changed:

  The functionality for denying an object to be deleted and informing a
  user about it is overridden when the user doesn't have privileges to
  delete it. This leads to the "not sufficient authorities" page content
  being sent through XML to the div which displays the "object cannot be
  deleted because of associated objects", resulting in weird output.
+ 
+ To replicate this create and log in with a user that cannot delete
+ indicator types. Then try to delete an indicator type that has
+ indicators associated with it.
+ 
+ In this case, the error message (not sufficient authorities) should be
+ sent directly to the feedback area instead of the "cannot delete
+ because..." message, ie. no xml parsing should take place.

** Description changed:

  The functionality for denying an object to be deleted and informing a
  user about it is overridden when the user doesn't have privileges to
  delete it. This leads to the "not sufficient authorities" page content
  being sent through XML to the div which displays the "object cannot be
  deleted because of associated objects", resulting in weird output.
  
  To replicate this create and log in with a user that cannot delete
  indicator types. Then try to delete an indicator type that has
  indicators associated with it.
  
  In this case, the error message (not sufficient authorities) should be
  sent directly to the feedback area instead of the "cannot delete
  because..." message, ie. no xml parsing should take place.
+ 
+ The solution should be centralized. All delete methods must be examined.

** Changed in: dhis2
     Assignee: Lars Helge Øverland (larshelge) => Hieu Duy Dang (hieu-hispvietnam)

-- 
No right to delete object + associated objects exist gives XML parser error
https://bugs.launchpad.net/bugs/331932
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.

Status in DHIS 2 - District Health Information Software: Confirmed

Bug description:
The functionality for denying an object to be deleted and informing a user about it is overridden when the user doesn't have privileges to delete it. This leads to the "not sufficient authorities" page content being sent through XML to the div which displays the "object cannot be deleted because of associated objects", resulting in weird output.

To replicate this create and log in with a user that cannot delete indicator types. Then try to delete an indicator type that has indicators associated with it.

In this case, the error message (not sufficient authorities) should be sent directly to the feedback area instead of the "cannot delete because..." message, ie. no xml parsing should take place.

The solution should be centralized. All delete methods must be examined.