added community profile setting from dialog (untested)

This commit is contained in:
2025-10-17 23:21:31 -06:00
parent 0edba20d1d
commit 83bd817630
5 changed files with 149 additions and 0 deletions
+9
View File
@@ -30,6 +30,7 @@ import (
// AmContext is the interface for Amsterdam's wrapper context that exposes the required functionality.
type AmContext interface {
ClearCommunityContext()
ClearLoginCookie()
ClearSession()
CurrentCommunity() *database.Community
@@ -84,6 +85,14 @@ type amContext struct {
isMemberLocked bool
}
// ClearCommunityContext clears the community context so changes will be reflected.
func (c *amContext) ClearCommunityContext() {
c.community = nil
c.isMember = false
c.isMemberLocked = false
c.effectiveLevel = c.user.BaseLevel
}
// ClearLoginCookie overwrites and removes the login cookie.
func (c *amContext) ClearLoginCookie() {
cookie := new(http.Cookie)