diff options
author | Kelly Washington <kelly@lindenlab.com> | 2012-06-27 17:07:30 -0700 |
---|---|---|
committer | Kelly Washington <kelly@lindenlab.com> | 2012-06-27 17:07:30 -0700 |
commit | 37f73782d21e8a66b6ede0b0356e6394d3338162 (patch) | |
tree | 673bd743c811fad949d5e80c5b0947ed30546a73 | |
parent | 1ca7d3a57e7185f56ba78b3e00c4f41f1e568746 (diff) |
MAINT-889 Viewer Group Invitation picker needs to limit to 100 residents
Requests to invite more than 100 agents at a time are blocked.
reviewed with Simon.
-rw-r--r-- | indra/newview/llpanelgroupinvite.cpp | 13 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_invite.xml | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index 7a15d93181..00dd206571 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -83,6 +83,7 @@ public: LLTextBox *mGroupName; std::string mOwnerWarning; std::string mAlreadyInGroup; + std::string mTooManySelected; bool mConfirmedOwnerInvite; void (*mCloseCallback)(void* data); @@ -185,6 +186,17 @@ void LLPanelGroupInvite::impl::submitInvitations() role_member_pairs[item->getUUID()] = role_id; } + const S32 MAX_GROUP_INVITES = 100; // Max invites per request. 100 to match server cap. + if (role_member_pairs.size() > MAX_GROUP_INVITES) + { + // Fail! + LLSD msg; + msg["MESSAGE"] = mTooManySelected; + LLNotificationsUtil::add("GenericAlert", msg); + (*mCloseCallback)(mCloseCallbackUserData); + return; + } + LLGroupMgr::getInstance()->sendGroupMemberInvites(mGroupID, role_member_pairs); if(already_in_group) @@ -621,6 +633,7 @@ BOOL LLPanelGroupInvite::postBuild() mImplementation->mOwnerWarning = getString("confirm_invite_owner_str"); mImplementation->mAlreadyInGroup = getString("already_in_group"); + mImplementation->mTooManySelected = getString("invite_selection_too_large"); update(); diff --git a/indra/newview/skins/default/xui/en/panel_group_invite.xml b/indra/newview/skins/default/xui/en/panel_group_invite.xml index cd834b61ce..124c0596c3 100644 --- a/indra/newview/skins/default/xui/en/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/en/panel_group_invite.xml @@ -19,6 +19,10 @@ name="already_in_group"> Some Residents you chose are already in the group, and so were not sent an invitation. </panel.string> + <panel.string + name="invite_selection_too_large"> + Group Invitations not sent: too many Residents selected. Group Invitations are limited to 100 per request. + </panel.string> <text type="string" length="1" |