Commits

Anonymous committed 4130d84

EXT-2524 : Disable ability to make links manually in non-god mode

Non-god mode treatment of copy/paste is now consistent with 1.23 behavior, and "paste as linK" doesn't show up in non-god mode.

Comments (0)

Files changed (1)

indra/newview/llinventorybridge.cpp

 		disabled_items.push_back(std::string("Paste"));
 	}
 
-	items.push_back(std::string("Paste As Link"));
-	if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0)
-	{
-		disabled_items.push_back(std::string("Paste As Link"));
+	if (gAgent.isGodlike())
+	{
+		items.push_back(std::string("Paste As Link"));
+		if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0)
+		{
+			disabled_items.push_back(std::string("Paste As Link"));
+		}
 	}
 	items.push_back(std::string("Paste Separator"));
 
 			return FALSE;
 		}
 
-		// All items can be copied, not all can be pasted.
-		// The only time an item can't be copied is if it's a link
-		// return (item->getPermissions().allowCopyBy(gAgent.getID()));
+		// You can never copy a link.
 		if (item->getIsLinkType())
 		{
 			return FALSE;
 		}
-		return TRUE;
+
+		if (gAgent.isGodlike())
+		{
+			// All items can be copied in god mode since you can
+			// at least paste-as-link the item, though you 
+			// still may not be able paste the item.
+			return TRUE;
+		}
+		else
+		{
+			return (item->getPermissions().allowCopyBy(gAgent.getID()));
+		}
 	}
 	return FALSE;
 }
+
 BOOL LLItemBridge::copyToClipboard() const
 {
 	if(isItemCopyable())