-
Notifications
You must be signed in to change notification settings - Fork 85
webview for user report initiation #2011
Conversation
pkg/controller/userreport/send.go
Outdated
"github.com/gorilla/sessions" | ||
) | ||
|
||
func stringFromSession(session *sessions.Session, key string) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above, please move into pkg/controller/session.go
</main> | ||
|
||
<script type="text/javascript"> | ||
{{if $currentRealm.RequireDate}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use requiredIf
on the actual HTML element instead of relying on javascript here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the attribute is already there - eventually this will do server side validation too
dropped
pkg/controller/userreport/index.go
Outdated
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
ctx := r.Context() | ||
logger := logging.FromContext(ctx).Named("userreport.HandleIndex") | ||
logger.Infow("serving index") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug
|
||
authApp := controller.AuthorizedAppFromContext(ctx) | ||
if authApp == nil { | ||
controller.Unauthorized(w, r, c.h) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
controller.Unauthorized(w, r, c.h) | |
controller.MissingAuthorizedApp(w, r, c.h) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to stay unauthorized for now - again error handling along this path is a TODO
return | ||
} | ||
|
||
nonce := controller.NonceFromContext(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you handle the case where nonce == ""
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is fine for now
Towards #1928
Proposed Changes
Release Note