summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepaneliteminfo.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-05-22 21:09:07 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-05-22 21:09:07 +0100
commit806fd24704b69e5e51dae108952937cc05840f6c (patch)
tree2047cbf2ad5364b5e803c06b2702216023d2d17d /indra/newview/llsidepaneliteminfo.cpp
parent8528a9ae131dff09865eccd672efce621571c5e5 (diff)
parent48af8529a80052e9bc42f81f36896739f8aff861 (diff)
merge
Diffstat (limited to 'indra/newview/llsidepaneliteminfo.cpp')
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 3c58dd7194..43e7e57814 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -815,40 +815,49 @@ void LLSidepanelItemInfo::onCommitPermissions()
//LL_INFOS() << "LLSidepanelItemInfo::onCommitPermissions()" << LL_ENDL;
LLViewerInventoryItem* item = findItem();
if(!item) return;
+
+ BOOL is_group_owned;
+ LLUUID owner_id;
+ LLUUID group_id;
LLPermissions perm(item->getPermissions());
+ perm.getOwnership(owner_id, is_group_owned);
+ if (is_group_owned && gAgent.hasPowerInGroup(owner_id, GP_OBJECT_MANIPULATE))
+ {
+ group_id = owner_id;
+ }
LLCheckBoxCtrl* CheckShareWithGroup = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(CheckShareWithGroup)
{
- perm.setGroupBits(gAgent.getID(), gAgent.getGroupID(),
+ perm.setGroupBits(gAgent.getID(), group_id,
CheckShareWithGroup->get(),
PERM_MODIFY | PERM_MOVE | PERM_COPY);
}
LLCheckBoxCtrl* CheckEveryoneCopy = getChild<LLCheckBoxCtrl>("CheckEveryoneCopy");
if(CheckEveryoneCopy)
{
- perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(),
+ perm.setEveryoneBits(gAgent.getID(), group_id,
CheckEveryoneCopy->get(), PERM_COPY);
}
LLCheckBoxCtrl* CheckNextOwnerModify = getChild<LLCheckBoxCtrl>("CheckNextOwnerModify");
if(CheckNextOwnerModify)
{
- perm.setNextOwnerBits(gAgent.getID(), gAgent.getGroupID(),
+ perm.setNextOwnerBits(gAgent.getID(), group_id,
CheckNextOwnerModify->get(), PERM_MODIFY);
}
LLCheckBoxCtrl* CheckNextOwnerCopy = getChild<LLCheckBoxCtrl>("CheckNextOwnerCopy");
if(CheckNextOwnerCopy)
{
- perm.setNextOwnerBits(gAgent.getID(), gAgent.getGroupID(),
+ perm.setNextOwnerBits(gAgent.getID(), group_id,
CheckNextOwnerCopy->get(), PERM_COPY);
}
LLCheckBoxCtrl* CheckNextOwnerTransfer = getChild<LLCheckBoxCtrl>("CheckNextOwnerTransfer");
if(CheckNextOwnerTransfer)
{
- perm.setNextOwnerBits(gAgent.getID(), gAgent.getGroupID(),
+ perm.setNextOwnerBits(gAgent.getID(), group_id,
CheckNextOwnerTransfer->get(), PERM_TRANSFER);
}
if(perm != item->getPermissions()