diff options
| author | Loren Shih <seraph@lindenlab.com> | 2009-07-24 16:20:15 +0000 |
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2009-07-24 16:20:15 +0000 |
| commit | f5ba6df4c2dc5a5e0842ed028dd4de01406dca3b (patch) | |
| tree | 20c3672125adec3f3db81864ef78143da01ec3c2 /indra/newview/llfloaterproperties.cpp | |
| parent | be7e9a46dbfa6bea2c6d1a0d4e9177eb633f26b4 (diff) | |
svn merge -r 127369:127511 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/landmark-permissions__merge__viewer2.0.0.3-r127280 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3
includes post-merge fix for DEV-36563 : Remove mAcceptsCallingCardNames
For DEV-36496 : Viewer merge for Landmark & Callingcard Permissions [VIEWER]
For DEV-36563 : Remove mAcceptsCallingCardNames
Test plans - EXTERNAL
* [ Test against a 1.30 server ]
* Test various permissions operations - both on items in inventory, and rezzed items and items that are embedded in objects.
* Test creating landmarks.
Test plans - INTERNAL
* Test against any inventory permissions smoke tests.
* See test plans in QAR-1644 for full Landmark&Callingcard Permissions test plan.
Diffstat (limited to 'indra/newview/llfloaterproperties.cpp')
| -rw-r--r-- | indra/newview/llfloaterproperties.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index ca7c929d74..8e86aa3ba9 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -303,12 +303,14 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) // do not enable the UI for incomplete items. LLViewerInventoryItem* i = (LLViewerInventoryItem*)item; BOOL is_complete = i->isComplete(); - + const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(i->getInventoryType()); + const BOOL is_calling_card = (i->getInventoryType() == LLInventoryType::IT_CALLINGCARD); const LLPermissions& perm = item->getPermissions(); const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE); const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm, - GP_OBJECT_SET_SALE); + GP_OBJECT_SET_SALE) && + !cannot_restrict_permissions; const BOOL is_link = LLAssetType::lookupIsLinkType(i->getActualType()); // You need permission to modify the object to modify an inventory @@ -325,11 +327,11 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) // ITEM NAME & DESC // ////////////////////// BOOL is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm, - GP_OBJECT_MANIPULATE) - && is_obj_modify && is_complete; + GP_OBJECT_MANIPULATE) + && is_obj_modify && is_complete; childSetEnabled("LabelItemNameTitle",TRUE); - childSetEnabled("LabelItemName",is_modifiable); + childSetEnabled("LabelItemName",is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards childSetText("LabelItemName",item->getName()); childSetEnabled("LabelItemDescTitle",TRUE); childSetEnabled("LabelItemDesc",is_modifiable); @@ -492,7 +494,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) ///////////// // Check for ability to change values. - if (is_link) + if (is_link || cannot_restrict_permissions) { childSetEnabled("CheckShareWithGroup",FALSE); childSetEnabled("CheckEveryoneCopy",FALSE); @@ -558,9 +560,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) childSetEnabled("CheckPurchase",is_complete); childSetEnabled("NextOwnerLabel",TRUE); - childSetEnabled("CheckNextOwnerModify",base_mask & PERM_MODIFY); - childSetEnabled("CheckNextOwnerCopy",base_mask & PERM_COPY); - childSetEnabled("CheckNextOwnerTransfer",next_owner_mask & PERM_COPY); + childSetEnabled("CheckNextOwnerModify",(base_mask & PERM_MODIFY) && !cannot_restrict_permissions); + childSetEnabled("CheckNextOwnerCopy",(base_mask & PERM_COPY) && !cannot_restrict_permissions); + childSetEnabled("CheckNextOwnerTransfer",(next_owner_mask & PERM_COPY) && !cannot_restrict_permissions); childSetEnabled("RadioSaleType",is_complete && is_for_sale); childSetEnabled("TextPrice",is_complete && is_for_sale); |
