Closed
Bug 888286
Opened 12 years ago
Closed 11 years ago
Per API Key Permissions
Categories
(Webmaker Graveyard :: MakeAPI, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: cade, Assigned: cade)
References
Details
Attachments
(1 file)
An app should only be able to Update or Delete makes that it creates.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → cade
Assignee | ||
Updated•12 years ago
|
Assignee | ||
Comment 1•11 years ago
|
||
I got this working on the train home.
Pretty much, this adds in a owner field (hidden from search results) to makes. The owner field is set to the public key of the application that authenticates with the makeAPI on a create call.
The owner of the make is checked on update, delete, like and unlike. in order to give higher powers to one key, I also added an ADMIN_API_KEY env variable. this can be used to correspond to webmaker's API key, so it can do whatever it likes with any make.
There's also a script to give makes an owner based on contentType.
Attachment #806298 -
Flags: review?(jon)
Assignee | ||
Comment 2•11 years ago
|
||
I updated the branch so that API key records can be flagged as admin in the database, eliminating the need for a env var.
Comment 3•11 years ago
|
||
Comment on attachment 806298 [details] [review]
https://github.com/mozilla/MakeAPI/pull/147
This is looking pretty solid, some things noted in the PR. How will local dev mode interact with this admin make mode?
Attachment #806298 -
Flags: review?(jon) → review-
Updated•11 years ago
|
Attachment mime type: text/plain → text/x-github-pull-request
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•11 years ago
|
Attachment #806298 -
Flags: review- → review?(jon)
Updated•11 years ago
|
Attachment #806298 -
Flags: review?(jon) → review-
Assignee | ||
Updated•11 years ago
|
Attachment #806298 -
Flags: review- → review?(jon)
Comment 4•11 years ago
|
||
Comment on attachment 806298 [details] [review]
https://github.com/mozilla/MakeAPI/pull/147
looks good, but we have another blocker before we can land this...
Attachment #806298 -
Flags: review?(jon) → review+
Comment 5•11 years ago
|
||
Commit pushed to master at https://github.com/mozilla/MakeAPI
https://github.com/mozilla/MakeAPI/commit/14f537fbba0f78fd69fe80fe139820de5676e439
Bug 888286 - Only permit the app that created a make, or webmaker.org to update or delete a make
Assignee | ||
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•