Pass user object to CommentForm (initial data)
|Reported by:||pigletto||Owned by:||nobody|
|Cc:||pigletto@…, waylan@…||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
CommentForm should check if current user is authenticated and if so, initial data for user's 'name' and 'email' should be filled.
Also, it is very useful to have access to at last user object (request?) in form's init. This way you're able to customize it a lot, eg. hide some fields or mark them readonly depending on user.
Proposed patch passes user object to CommentForm and then initial data are populated with 'name' and 'email' from user object