Index: indra/newview/llwearablelist.cpp
===================================================================
--- indra/newview/llwearablelist.cpp	(révision 2220)
+++ indra/newview/llwearablelist.cpp	(copie de travail)
@@ -37,6 +37,7 @@
 #include "message.h"
 #include "llassetstorage.h"
 #include "llagent.h"
+#include "lldefaultperms.h"
 #include "llvoavatar.h"
 #include "llviewerinventory.h"
 //#include "llfloaterchat.h"
@@ -305,8 +306,10 @@
 	wearable->setName( name );
 
 	LLPermissions perm;
-	perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
-	perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, PERM_MOVE | PERM_TRANSFER);
+	U32 everyone_perm = LLDefaultPerms::getEveryonePerms(),
+	    group_perm = LLDefaultPerms::getGroupPerms(),
+	    next_owner_perm = LLDefaultPerms::getNextOwnerPerms() | PERM_TRANSFER;
+	perm.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
 	wearable->setPermissions(perm);
 
 	// Description and sale info have default values.
Index: indra/newview/llinventoryview.h
===================================================================
--- indra/newview/llinventoryview.h	(révision 2220)
+++ indra/newview/llinventoryview.h	(copie de travail)
@@ -144,7 +144,7 @@
 					   const LLUUID& parent_id,
 					   LLAssetType::EType asset_type,
 					   LLInventoryType::EType inv_type,
-					   U32 next_owner_perm = 0);
+					   U32 next_owner_perm);
 
 protected:
 	LLInventoryModel*			mInventory;
Index: indra/newview/llinventoryview.cpp
===================================================================
--- indra/newview/llinventoryview.cpp	(révision 2220)
+++ indra/newview/llinventoryview.cpp	(copie de travail)
@@ -42,6 +42,7 @@
 #include "llagent.h"
 #include "llcallingcard.h"
 #include "llcheckboxctrl.h"		// for radio buttons
+#include "lldefaultperms.h"
 #include "llradiogroup.h"
 #include "llspinctrl.h"
 #include "lltextbox.h"
@@ -1737,9 +1738,10 @@
 {
 	std::string desc;
 	LLAssetType::generateDescriptionFor(asset_type, desc);
-	next_owner_perm = (next_owner_perm) ? next_owner_perm : PERM_MOVE | PERM_TRANSFER;
 
-	
+// TODO: handle "share with group" and "everyone can copy" default permissions too
+	next_owner_perm |= LLDefaultPerms::getNextOwnerPerms();
+
 	if (inv_type == LLInventoryType::IT_GESTURE)
 	{
 		LLPointer<LLInventoryCallback> cb = new CreateGestureCallback();
Index: indra/newview/llviewerinventory.cpp
===================================================================
--- indra/newview/llviewerinventory.cpp	(révision 2220)
+++ indra/newview/llviewerinventory.cpp	(copie de travail)
@@ -711,6 +711,7 @@
 	msg->addU32Fast(_PREHASH_CallbackID, gInventoryCallbacks.registerCB(cb));
 	msg->addUUIDFast(_PREHASH_FolderID, parent);
 	msg->addUUIDFast(_PREHASH_TransactionID, transaction_id);
+// TODO: be able to set "everyone" and "group" masks as well
 	msg->addU32Fast(_PREHASH_NextOwnerMask, next_owner_perm);
 	msg->addS8Fast(_PREHASH_Type, (S8)asset_type);
 	msg->addS8Fast(_PREHASH_InvType, (S8)inv_type);
