if (!user.IsExternalUser) { if (!companies.ContainsKey(user.CompanyTitle))…
- User
if (!user.IsExternalUser) { if (!companies.ContainsKey(user.CompanyTitle)) logger.Warn($"{user.Login}: Неизвестная компания {user.CompanyTitle}"); else { var company = companies[user.CompanyTitle]; user.Rights = company.DefaultRights; user.CompanyId = company.Id; }
codelogger.Info($"Новый сотрудник: {user.Login}"); } - Assistant
// If the user is not an external user if (!user.IsExternalUser) { // Check if the user's company title exists in the companies dictionary if (!companies.ContainsKey(user.CompanyTitle)) { // Log a warning message if the company title is unknown logger.Warn("{user.Login}: Неизвестная компания {user.CompanyTitle}"); } else { // Get the company from the companies dictionary using the company title var company = companies[user.CompanyTitle]; // Set the user's rights to the default rights of the company user.Rights = company.DefaultRights; // Set the user's company ID to the ID of the company user.CompanyId = company.Id; } // Log a message indicating a new employee has been added logger.Info("Новый сотрудник: {user.Login}"); }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.