mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-22 20:41:40 +02:00
feat: redirect to requested page after login, solves #281
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
{{- if .Infos.hasOpenIDConnect}}
|
||||
<a class="btn btn-primary" href="/oidc-login">OpenID Connect Login</a>
|
||||
{{end}}
|
||||
<input type="hidden" id="redirect" name="redirect" value="{{ .Redirect }}" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -99,6 +99,7 @@ type Page struct {
|
||||
Infos map[string]interface{} // For generic use (e.g. username for /monitoring/user/<id>, job id for /monitoring/job/<id>)
|
||||
Config map[string]interface{} // UI settings for the currently logged in user (e.g. line width, ...)
|
||||
Resampling *schema.ResampleConfig // If not nil, defines resampling trigger and resolutions
|
||||
Redirect string // The originally requested URL, for intermediate login handling
|
||||
}
|
||||
|
||||
func RenderTemplate(rw http.ResponseWriter, file string, page *Page) {
|
||||
|
Reference in New Issue
Block a user