GH-3992 fix for missing templates, error when 'system' not found as user. (#3998)

This commit is contained in:
Scott Bishel 2022-10-11 13:34:33 -06:00 committed by GitHub
parent 100b457911
commit eb7601d841
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -803,6 +803,9 @@ func (s *MattermostAuthLayer) GetMemberForBoard(boardID, userID string) (*model.
bm, err := s.Store.GetMemberForBoard(boardID, userID)
// Explicit membership not found
if model.IsErrNotFound(err) {
if userID == model.SystemUserID {
return nil, model.NewErrNotFound(userID)
}
var user *model.User
// No synthetic memberships for guests
user, err = s.GetUserByID(userID)