diff options
| author | Baker Linden <baker@lindenlab.com> | 2014-03-25 16:21:07 -0700 |
|---|---|---|
| committer | Baker Linden <baker@lindenlab.com> | 2014-03-25 16:21:07 -0700 |
| commit | aef1cc0576c4bf1e7248f1008a1582771845c59f (patch) | |
| tree | 0117af4f2ef31600defafee1ac2ae500c7d28d40 /indra/newview/llpanelgrouproles.cpp | |
| parent | 14b88dad573138252879b2dfe6e021b6df0b3485 (diff) | |
[GroupBan]
- Fixed stuff... again
- Put "Ban Members" button back in Member tab
Reviewer: Richard
Diffstat (limited to 'indra/newview/llpanelgrouproles.cpp')
| -rwxr-xr-x | indra/newview/llpanelgrouproles.cpp | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index d1eae8027a..5093207c50 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1012,15 +1012,15 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() } // If anyone selected is in any role besides 'Everyone' then they can't be ejected. - if (role_id.notNull() && (count > 0)) - { + if (role_id.notNull() && (count > 0)) + { can_eject_members = FALSE; - can_ban_members = FALSE; - if (role_id == gdatap->mOwnerRole) - { - member_is_owner = TRUE; - } - } + can_ban_members = FALSE; + if (role_id == gdatap->mOwnerRole) + { + member_is_owner = TRUE; + } + } LLRoleData rd; if (gdatap->getRoleData(role_id,rd)) @@ -1096,6 +1096,35 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() can_ban_members = TRUE; } } + + } + + // ... or we can eject them because we have all the requisite powers... + if( gAgent.hasPowerInGroup(mGroupID, GP_ROLE_REMOVE_MEMBER) && + !member_is_owner) + { + if( gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT)) + { + can_eject_members = TRUE; + } + + if( gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS)) + { + can_ban_members = TRUE; + } + } + + + uuid_vec_t::const_iterator member_iter = selected_members.begin(); + uuid_vec_t::const_iterator member_end = selected_members.end(); + for ( ; member_iter != member_end; ++member_iter) + { + // Don't count the agent. + if ((*member_iter) == gAgent.getID()) + { + can_eject_members = FALSE; + can_ban_members = FALSE; + } } mBanBtn->setEnabled(can_ban_members); |
