coderly / teamplaybook-ember

0 stars 0 forks source link

Owner can remove team members #20

Closed begedin closed 9 years ago

begedin commented 9 years ago

If I failed to explain this in the previous PR #19, i decided to merge the team members and team memberships routes into one route, which simply displays all team memberships, with different options depending on the membership role.

I tried to make it easily modifiable as I could. There are 3 components that compose the actual membership listing - one for information about the membership and/or member, one for role change actions and one for removal from team. Each component is render or not-rendered depending on what the current user is.

current-user is no longer used

The way our API works is that it returns the current-user upon successful authentication, as a response to an authentication request.

The way simple-auth works is that it stores whatever is returned by the API as a response in an authentication request into session.secure. This means we already have everything we currently need in relation to the current user right there, so there is at the moment no need to customize the session to add a currentUser property to it.

It also means we technically do not need a current user model on the client side, or a /me endpoint on the API side, but I decided to leave those in since I'm expecting we will need that when we decide to implement some sort of profile editing.

Team members integration test module has grown A LOT

I'd like to shrink it somehow, but I'm still figuring the best way to separate it without a lot of redundancy.

ToDO

begedin commented 9 years ago

This one is up to date with development, so it's as reviewable as it gets.