even tighter

This commit is contained in:
Manush Dodunekov 2020-01-09 00:31:40 +01:00
parent 10de9b6b89
commit 7d17aad805

View file

@ -180,8 +180,7 @@ func updateUserAccess(accessMap map[int64]*userAccess, user *User, mode AccessMo
if ua, ok := accessMap[user.ID]; ok { if ua, ok := accessMap[user.ID]; ok {
ua.Mode = maxAccessMode(ua.Mode, mode) ua.Mode = maxAccessMode(ua.Mode, mode)
} else { } else {
ua = &userAccess{User: user, Mode: mode} accessMap[user.ID] = &userAccess{User: user, Mode: mode}
accessMap[user.ID] = ua
} }
} }