Set system.creator based on Auth on Create WI REST Endpoints #244
Comments
|
@aslakknutsen @tsmaeder @baijum : please can you verify this flow for solving the task :-
Assumptions
Questions
|
|
Using a middleware to extract the user email and setting it to context looks like a good idea. Maybe you can take a look at this implementation for some inspiration: https://github.com/auth0/go-jwt-middleware |
|
@pranavgore09 This does part of the TokenToUser Context lookup; https://github.com/almighty/almighty-core/pull/229/files#diff-6b1a7621961d1f6fe7463db59c5afef5R73 |
The backend will populate and override whatever the client says here based on the provided AuthToken
Hmm, good question. It's not required by Client to input, but it's required for WI to be 'complete'. We're currently not really separating on that. @kwk @tsmaeder thoughts? |
|
@aslakknutsen thanks, I did not see |
|
reference for testing "logged in" user. https://gist.github.com/aslakknutsen/d11944c924acfd32bedb60ebbf9a8d7f |
|
@aslakknutsen @tsmaeder , currently we are setting syste,creator in POST call. (Not to be done in this sprint or in this PR/issue just asking here because of relevance) |
Yes, but it doesn't really make sense until we track changes individually: Else we would only store who changed it last time. I would hold on of adding any modified_by WI field until we know how we're implementing it. |
Depends on #229
The text was updated successfully, but these errors were encountered: