summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaker Linden <baker@lindenlab.com>2013-10-30 15:27:58 -0700
committerBaker Linden <baker@lindenlab.com>2013-10-30 15:27:58 -0700
commit092ba811f99eb68c9ec3cfbaa904fcb7fd4935d3 (patch)
tree2eda63b19ca5b0beef674a5218c4c1c93f963b26
parente6f6b6526bd7cd31bad33a97b05667a79a3f3004 (diff)
[MAINT-3384] - Ban list UI is partially enabled for users without group ban ability
- Fixed the issue where "Ban Resident" button was enabled for members without the group ban ability
-rwxr-xr-xindra/newview/llpanelgrouproles.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 347d2135b1..ad0e7ba753 100755
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -2699,7 +2699,7 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root)
mBanList->setCommitCallback(onBanEntrySelect, this);
mCreateBanButton->setClickedCallback(onCreateBanEntry, this);
- mCreateBanButton->setEnabled(TRUE);
+ mCreateBanButton->setEnabled(FALSE);
mDeleteBanButton->setClickedCallback(onDeleteBanEntry, this);
mDeleteBanButton->setEnabled(FALSE);
@@ -2720,6 +2720,11 @@ void LLPanelGroupBanListSubTab::activate()
mBanList->deselectAllItems();
mDeleteBanButton->setEnabled(FALSE);
+ if (gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS))
+ {
+ mCreateBanButton->setEnabled(TRUE);
+ }
+
// BAKER: Should I really request everytime activate() is called?
// Perhaps I should only do it on a force refresh, or if an action on the list happens...
// Because it's not going to live-update the list anyway... You'd have to refresh if you
@@ -2756,7 +2761,9 @@ void LLPanelGroupBanListSubTab::onBanEntrySelect(LLUICtrl* ctrl, void* user_data
void LLPanelGroupBanListSubTab::handleBanEntrySelect()
{
if (gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS))
+ {
mDeleteBanButton->setEnabled(TRUE);
+ }
}
void LLPanelGroupBanListSubTab::onCreateBanEntry(void* user_data)