From b29c7173c68707c7173c5bc26e54047e8f751c15 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 16 May 2018 23:50:57 +0300 Subject: MAINT-8581 Better handling of adding Estate Managers to Banned list --- indra/newview/llfloaterregioninfo.cpp | 17 +++++++++++++++++ indra/newview/skins/default/xui/en/notifications.xml | 7 +++++++ 2 files changed, 24 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index c6271209a8..1d7c13109d 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3587,6 +3587,7 @@ void LLPanelEstateAccess::accessAddCore3(const uuid_vec_t& ids, void* data) if (change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD) { LLNameListCtrl* name_list = panel->getChild("banned_avatar_name_list"); + LLNameListCtrl* em_list = panel->getChild("estate_manager_name_list"); int currentCount = (name_list ? name_list->getItemCount() : 0); if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS) { @@ -3601,9 +3602,17 @@ void LLPanelEstateAccess::accessAddCore3(const uuid_vec_t& ids, void* data) } std::string already_banned; + std::string em_ban; bool single = true; for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { + LLScrollListItem* em_item = em_list->getNameItemByAgentId(*it); + if (em_item) + { + em_ban = em_item->getColumn(0)->getValue().asString(); + break; + } + LLScrollListItem* item = name_list->getNameItemByAgentId(*it); if (item) { @@ -3615,6 +3624,14 @@ void LLPanelEstateAccess::accessAddCore3(const uuid_vec_t& ids, void* data) already_banned += item->getColumn(0)->getValue().asString(); } } + if (!em_ban.empty()) + { + LLSD args; + args["AGENT"] = em_ban; + LLNotificationsUtil::add("ProblemBanningEstateManager", args); + delete change_info; + return; + } if (!already_banned.empty()) { LLSD args; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index d139534328..98cd11fb6c 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3806,6 +3806,13 @@ Can't add estate owner to estate 'Banned Resident' list. Unable to add banned resident to estate manager list. + +Unable to add estate manager [AGENT] to banned list. + +