resume active sessions

This commit is contained in:
ari committed 2026-11-01 15:52:46 -05:00
1 parent 9e94c05fb6
commit 917a361370
19 files changed
+871 -42

No files matched your search

+7
View File
@@ -124,6 +124,13 @@ func (p PermissionsConfig) Allowed(kind OwnerKind, channel, user string, a Actio
func (p PermissionsConfig) IsManager(user string) bool { return slices.Contains(p.Managers, user) }
// A super user is anyone on the list that applies to the channel, with any permission.
// DM channels have no list of their own, so the default list applies.
func (p PermissionsConfig) IsSuperUser(channel, user string) bool {
list, _ := p.SuperUsers(channel)
return p.IsManager(user) || len(list[user]) > 0
}
func (p PermissionsConfig) CanManage(channel, user string) bool {
return p.IsManager(user) || p.Allowed(OwnerChannel, channel, user, ActManage)
}