No right to delete object + associated objects exist gives XML parser error

Reported by Lars Helge Øverland on 2009-02-20
2
Affects Status Importance Assigned to Milestone
DHIS
Undecided
Hieu Duy Dang

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.

Changed in dhis2:
assignee: nobody → larshelge
Changed in dhis2:
status: New → Confirmed
milestone: none → 2.0.5
description: updated
description: updated
Changed in dhis2:
assignee: Lars Helge Øverland (larshelge) → Hieu Duy Dang (hieu-hispvietnam)

Please checking out for testing this bug on the branch of i18n-uniqueness.

This fixed bug on the hieu branch not i18n-uniqueness anymore

On Thu, Apr 29, 2010 at 8:14 AM, Hieu Duy Dang
<email address hidden>wrote:

> This fixed bug on the hieu branch not i18n-uniqueness anymore
>
> OK good will have a look.

> --
> 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 direct subscriber
> of the bug.
>
> 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.
>
>
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/dhis2/+bug/331932/+subscribe
>

Changed in dhis2:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers