pretenders / ployst

The ployst core repo
1 stars 0 forks source link

Carles/312 api security #18

Closed txels closed 10 years ago

txels commented 10 years ago

Functional description

Supports two security mechanisms as defined in http://txels.tpondemand.com/entity/312.

Tokens need to be created in core (can be done via admin), and then you will be able to register this token in the client, e.g. storing it as a setting.

Tokens are fairly simple things, consisting of an informative label and a key. We can eventually later extend this to use tokens for other purposes (teams and users).

Additionally to the permissions/ownership check, I added a useful mixin that allows to dynamically limit which fields to return in the payload.

Permissions and dynamic field mixin are applied for now to repos and features.

Example for manual testing:


Code details

This work in progress includes:

I'll probably extend this with additional tests for the base classes/mixins. If you have suggestions about what else to test let me know.