ForbiddenAttribute exception raised changing property of object
Bug #271029 reported by
Diogo Matsubara
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Unassigned |
Bug Description
As seen in OOPS-990S35 a ForbiddenAttribute was raised because the user didn't have the permission to set that distribution property.
This OOPS looks similar to bug 267888 and the appropriate response is to return a 401 (Unauthorized)
To reproduce:
>>> ubuntu = lp.distributions[0]
>>> ubuntu.active = False
>>> ubuntu.lp_save()
Exception type ForbiddenAttribute
Exception value ('active', <Distribution at 0x970a690>)
description: | updated |
Changed in launchpad-foundations: | |
status: | New → Triaged |
Changed in launchpad-foundations: | |
importance: | Undecided → Medium |
Changed in launchpad: | |
importance: | Medium → Critical |
To post a comment you must log in.
A similar OOPS happened: OOPS-1488EA884, this time using the anonymous Launchpad object.
To reproduce:
>>> anon_lp = Launchpad. login_anonymous ly('foo' ) distributions[ 'ubuntu' ] getSeries( name_or_ version= 'lucid' ) Package( name='gcc- defaults' ) projects[ 'launchpad' ] getSeries( name="devel" )
>>> ubuntu = anon_lp.
>>> lucid = ubuntu.
>>> sp = lucid.getSource
>>> lp_project = anon_lp.
>>> devel_series = lp_project.
>>> sp.productseries = devel_series
>>> sp.lp_save()
HTTPError: HTTP Error 500: Internal Server Error
Response body:
---
ForbiddenAttribute