added community profile setting from dialog (untested)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user