diff --git a/heicode/controller/heicode_agnet_session.go b/heicode/controller/heicode_agnet_session.go index fdf1582..534cd37 100644 --- a/heicode/controller/heicode_agnet_session.go +++ b/heicode/controller/heicode_agnet_session.go @@ -226,13 +226,7 @@ func syncLocalUserFromAgnet(me agnetMeEnvelope) (*model.User, error) { user.DisplayName = name changed = true } - // Platform administrators keep their human-assigned group (e.g. "default") - // regardless of what Agnet's /me returns. Operators provision channel - // membership for them manually; letting Agnet rewrite it on every web - // login would force them onto whatever stub channel Agnet hands out, and - // abilities lookup against that empty group would erase model visibility. - if ch := strings.TrimSpace(me.Data.ChannelID); ch != "" && user.Group != ch && - user.Role < common.RoleRootUser { + if ch := strings.TrimSpace(me.Data.ChannelID); ch != "" && user.Group != ch { user.Group = ch changed = true }