Closed Bug 868623 Opened 12 years ago Closed 12 years ago

app.user.owns is falsey for installed paid apps

Categories

(Marketplace Graveyard :: API, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
2013-05-09

People

(Reporter: basta, Assigned: andy+bugzilla)

References

Details

1. Purchase a paid app 2. Check the /api/v1/account/installed/mine/ API endpoint The app objects for the paid app you just installed have something like this: { "name": "Sea Van: Fully Loaded", ... "user": { "owns": 0 } } I don't think it should ever be the case that an app at that endpoint would be !user.owns.
Assignee: nobody → amckay
Priority: P1 → P2
Target Milestone: --- → 2013-05-09
Owns isn't want you think it is, "owns" is checking that the user is a developer of the app https://github.com/mozilla/zamboni/blob/master/mkt/webapps/utils.py#L89 Perhaps docs or re-wording that variable would make sense, "author" for example. As it is, having it in the installed list should be enough to know the user owns it.
(In reply to Andy McKay [:andym] from comment #1) > Owns isn't want you think it is, "owns" is checking that the user is a > developer of the app > > https://github.com/mozilla/zamboni/blob/master/mkt/webapps/utils.py#L89 Hmm that's odd. > Perhaps docs or re-wording that variable would make sense, "author" for > example. > > As it is, having it in the installed list should be enough to know the user > owns it. The use case isn't for that particular page. This is for instances where the user searches for an app and they've previously purchased or installed it but do not currently have it installed. The My Apps page shows the issue most clearly.
user.owns is in the search API and app API also. Can we determine this client side? I'm working towards making the search API not hit the database at all. I can check request.user in user.owns if we think "owns" means what it does now, which is the user is one of the authors of the app. If we need to update the ES index each time the app is installed I think that would potentially be a lot of writing to the index.
"owns" is a terrible word with too many meanings. I'd rather have "installed", "purchased", "developed" or something. With the caveat "installed" is marketplace specific which could disagree with the device.
(In reply to Rob Hudson [:robhudson] from comment #3) > user.owns is in the search API and app API also. Can we determine this > client side? The problem is that if the user has purchased an app but doesn't have it installed, we have no way of determining that. The same goes for app installation (or the future "save to phone" status) > I'm working towards making the search API not hit the database at all. I can > check request.user in user.owns if we think "owns" means what it does now, > which is the user is one of the authors of the app. > > If we need to update the ES index each time the app is installed I think > that would potentially be a lot of writing to the index. Maybe we could use some kind of fast key/value data store? You know, if we had Redis...
> If we need to update the ES index each time the app is installed I think > that would potentially be a lot of writing to the index. Yeah to satisfy our current API configuration we'll have to overlay some data on top of the ES calls or join together mutltiple ES results. (e.g. if user installed ended up in ES)
(In reply to Andy McKay [:andym] from comment #4) > "owns" is a terrible word with too many meanings. I'd rather have > "installed", "purchased", "developed" or something. With the caveat > "installed" is marketplace specific which could disagree with the device. So how about changing to have these values?
That works for me.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.