aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSean Dague2008-07-23 22:14:29 +0000
committerSean Dague2008-07-23 22:14:29 +0000
commitcf317f5c3352f066fd61a0fa5de19c93947be22c (patch)
tree2decd9652f6270789713f98b2ac550395b125c08 /OpenSim
parentadd primitems migration for nhibernate (diff)
downloadopensim-SC-cf317f5c3352f066fd61a0fa5de19c93947be22c.zip
opensim-SC-cf317f5c3352f066fd61a0fa5de19c93947be22c.tar.gz
opensim-SC-cf317f5c3352f066fd61a0fa5de19c93947be22c.tar.bz2
opensim-SC-cf317f5c3352f066fd61a0fa5de19c93947be22c.tar.xz
refactor TaskInventoryItem Mask -> Permissions to be consistant with how things
are stored in the db.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLDataStore.cs20
-rw-r--r--OpenSim/Data/MySQL/MySQLDataStore.cs20
-rw-r--r--OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml17
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs20
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs10
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs100
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs42
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs12
11 files changed, 145 insertions, 128 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
index 0ae879a..3f85fef 100644
--- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
@@ -973,11 +973,11 @@ namespace OpenSim.Data.MSSQL
973 taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); 973 taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]);
974 taskItem.GroupID = new LLUUID((String)row["groupID"]); 974 taskItem.GroupID = new LLUUID((String)row["groupID"]);
975 975
976 taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); 976 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
977 taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); 977 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
978 taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); 978 taskItem.BasePermissions = Convert.ToUInt32(row["basePermissions"]);
979 taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); 979 taskItem.EveryonePermissions = Convert.ToUInt32(row["everyonePermissions"]);
980 taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); 980 taskItem.GroupPermissions = Convert.ToUInt32(row["groupPermissions"]);
981// taskItem.Flags = Convert.ToUInt32(row["flags"]); 981// taskItem.Flags = Convert.ToUInt32(row["flags"]);
982 982
983 return taskItem; 983 return taskItem;
@@ -1170,11 +1170,11 @@ namespace OpenSim.Data.MSSQL
1170 row["ownerID"] = taskItem.OwnerID; 1170 row["ownerID"] = taskItem.OwnerID;
1171 row["lastOwnerID"] = taskItem.LastOwnerID; 1171 row["lastOwnerID"] = taskItem.LastOwnerID;
1172 row["groupID"] = taskItem.GroupID; 1172 row["groupID"] = taskItem.GroupID;
1173 row["nextPermissions"] = taskItem.NextOwnerMask; 1173 row["nextPermissions"] = taskItem.NextPermissions;
1174 row["currentPermissions"] = taskItem.OwnerMask; 1174 row["currentPermissions"] = taskItem.CurrentPermissions;
1175 row["basePermissions"] = taskItem.BaseMask; 1175 row["basePermissions"] = taskItem.BasePermissions;
1176 row["everyonePermissions"] = taskItem.EveryoneMask; 1176 row["everyonePermissions"] = taskItem.EveryonePermissions;
1177 row["groupPermissions"] = taskItem.GroupMask; 1177 row["groupPermissions"] = taskItem.GroupPermissions;
1178// row["flags"] = taskItem.Flags; 1178// row["flags"] = taskItem.Flags;
1179 } 1179 }
1180 1180
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index 2ace4b1..7482df3 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -1258,11 +1258,11 @@ namespace OpenSim.Data.MySQL
1258 taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); 1258 taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]);
1259 taskItem.GroupID = new LLUUID((String)row["groupID"]); 1259 taskItem.GroupID = new LLUUID((String)row["groupID"]);
1260 1260
1261 taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); 1261 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
1262 taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); 1262 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
1263 taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); 1263 taskItem.BasePermissions = Convert.ToUInt32(row["basePermissions"]);
1264 taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); 1264 taskItem.EveryonePermissions = Convert.ToUInt32(row["everyonePermissions"]);
1265 taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); 1265 taskItem.GroupPermissions = Convert.ToUInt32(row["groupPermissions"]);
1266 taskItem.Flags = Convert.ToUInt32(row["flags"]); 1266 taskItem.Flags = Convert.ToUInt32(row["flags"]);
1267 1267
1268 return taskItem; 1268 return taskItem;
@@ -1519,11 +1519,11 @@ namespace OpenSim.Data.MySQL
1519 row["ownerID"] = taskItem.OwnerID; 1519 row["ownerID"] = taskItem.OwnerID;
1520 row["lastOwnerID"] = taskItem.LastOwnerID; 1520 row["lastOwnerID"] = taskItem.LastOwnerID;
1521 row["groupID"] = taskItem.GroupID; 1521 row["groupID"] = taskItem.GroupID;
1522 row["nextPermissions"] = taskItem.NextOwnerMask; 1522 row["nextPermissions"] = taskItem.NextPermissions;
1523 row["currentPermissions"] = taskItem.OwnerMask; 1523 row["currentPermissions"] = taskItem.CurrentPermissions;
1524 row["basePermissions"] = taskItem.BaseMask; 1524 row["basePermissions"] = taskItem.BasePermissions;
1525 row["everyonePermissions"] = taskItem.EveryoneMask; 1525 row["everyonePermissions"] = taskItem.EveryonePermissions;
1526 row["groupPermissions"] = taskItem.GroupMask; 1526 row["groupPermissions"] = taskItem.GroupPermissions;
1527 row["flags"] = taskItem.Flags; 1527 row["flags"] = taskItem.Flags;
1528 } 1528 }
1529 1529
diff --git a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
index 9fc8065..00bf841 100644
--- a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
@@ -110,4 +110,21 @@
110 </id> 110 </id>
111 <property name="Map" type="System.Byte[]" /> 111 <property name="Map" type="System.Byte[]" />
112 </class> 112 </class>
113 <class name="OpenSim.Framework.TaskInventoryItem, OpenSim.Framework" table="PrimItems" lazy="false">
114 <id name="ItemID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate">
115 <generator class="assigned" />
116 </id>
117 <property name="PrimID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
118 <property name="AssetID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
119 <property name="ParentFolderID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
120 <property name="CreatorID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
121 <property name="OwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
122 <property name="GroupID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
123 <property name="LastOwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
124 <property name="CurrentPermissions" type="System.UInt32" />
125 <property name="BasePermissions" type="System.UInt32" />
126 <property name="EveryonePermissions" type="System.UInt32" />
127 <property name="GroupPermissions" type="System.UInt32" />
128 <property name="NextPermissions" type="System.UInt32" />
129 </class>
113</hibernate-mapping> \ No newline at end of file 130</hibernate-mapping> \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 0f9323b..f780d1d 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -1014,11 +1014,11 @@ namespace OpenSim.Data.SQLite
1014 taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); 1014 taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]);
1015 taskItem.GroupID = new LLUUID((String)row["groupID"]); 1015 taskItem.GroupID = new LLUUID((String)row["groupID"]);
1016 1016
1017 taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); 1017 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
1018 taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); 1018 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
1019 taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); 1019 taskItem.BasePermissions = Convert.ToUInt32(row["basePermissions"]);
1020 taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); 1020 taskItem.EveryonePermissions = Convert.ToUInt32(row["everyonePermissions"]);
1021 taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); 1021 taskItem.GroupPermissions = Convert.ToUInt32(row["groupPermissions"]);
1022 taskItem.Flags = Convert.ToUInt32(row["flags"]); 1022 taskItem.Flags = Convert.ToUInt32(row["flags"]);
1023 1023
1024 return taskItem; 1024 return taskItem;
@@ -1254,11 +1254,11 @@ namespace OpenSim.Data.SQLite
1254 row["ownerID"] = taskItem.OwnerID; 1254 row["ownerID"] = taskItem.OwnerID;
1255 row["lastOwnerID"] = taskItem.LastOwnerID; 1255 row["lastOwnerID"] = taskItem.LastOwnerID;
1256 row["groupID"] = taskItem.GroupID; 1256 row["groupID"] = taskItem.GroupID;
1257 row["nextPermissions"] = taskItem.NextOwnerMask; 1257 row["nextPermissions"] = taskItem.NextPermissions;
1258 row["currentPermissions"] = taskItem.OwnerMask; 1258 row["currentPermissions"] = taskItem.CurrentPermissions;
1259 row["basePermissions"] = taskItem.BaseMask; 1259 row["basePermissions"] = taskItem.BasePermissions;
1260 row["everyonePermissions"] = taskItem.EveryoneMask; 1260 row["everyonePermissions"] = taskItem.EveryonePermissions;
1261 row["groupPermissions"] = taskItem.GroupMask; 1261 row["groupPermissions"] = taskItem.GroupPermissions;
1262 row["flags"] = taskItem.Flags; 1262 row["flags"] = taskItem.Flags;
1263 } 1263 }
1264 1264
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index 512ba99..9b497ab 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -236,7 +236,7 @@ namespace OpenSim.Framework
236 } 236 }
237 } 237 }
238 238
239 public uint BaseMask { 239 public uint BasePermissions {
240 get { 240 get {
241 return _baseMask; 241 return _baseMask;
242 } 242 }
@@ -272,7 +272,7 @@ namespace OpenSim.Framework
272 } 272 }
273 } 273 }
274 274
275 public uint EveryoneMask { 275 public uint EveryonePermissions {
276 get { 276 get {
277 return _everyoneMask; 277 return _everyoneMask;
278 } 278 }
@@ -299,7 +299,7 @@ namespace OpenSim.Framework
299 } 299 }
300 } 300 }
301 301
302 public uint GroupMask { 302 public uint GroupPermissions {
303 get { 303 get {
304 return _groupMask; 304 return _groupMask;
305 } 305 }
@@ -344,7 +344,7 @@ namespace OpenSim.Framework
344 } 344 }
345 } 345 }
346 346
347 public uint NextOwnerMask { 347 public uint NextPermissions {
348 get { 348 get {
349 return _nextOwnerMask; 349 return _nextOwnerMask;
350 } 350 }
@@ -362,7 +362,7 @@ namespace OpenSim.Framework
362 } 362 }
363 } 363 }
364 364
365 public uint OwnerMask { 365 public uint CurrentPermissions {
366 get { 366 get {
367 return _ownerMask; 367 return _ownerMask;
368 } 368 }
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index d1fd63c..efc910a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -4756,7 +4756,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4756 if (ti.OwnerID != AgentId) 4756 if (ti.OwnerID != AgentId)
4757 break; 4757 break;
4758 4758
4759 if ((ti.OwnerMask & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) 4759 if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
4760 break; 4760 break;
4761 4761
4762 if (ti.AssetID != requestID) 4762 if (ti.AssetID != requestID)
@@ -5103,11 +5103,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5103 newTaskItem.CreatorID = updatetask.InventoryData.CreatorID; 5103 newTaskItem.CreatorID = updatetask.InventoryData.CreatorID;
5104 newTaskItem.OwnerID = updatetask.InventoryData.OwnerID; 5104 newTaskItem.OwnerID = updatetask.InventoryData.OwnerID;
5105 newTaskItem.GroupID = updatetask.InventoryData.GroupID; 5105 newTaskItem.GroupID = updatetask.InventoryData.GroupID;
5106 newTaskItem.BaseMask = updatetask.InventoryData.BaseMask; 5106 newTaskItem.BasePermissions = updatetask.InventoryData.BaseMask;
5107 newTaskItem.OwnerMask = updatetask.InventoryData.OwnerMask; 5107 newTaskItem.CurrentPermissions = updatetask.InventoryData.OwnerMask;
5108 newTaskItem.GroupMask = updatetask.InventoryData.GroupMask; 5108 newTaskItem.GroupPermissions = updatetask.InventoryData.GroupMask;
5109 newTaskItem.EveryoneMask = updatetask.InventoryData.EveryoneMask; 5109 newTaskItem.EveryonePermissions = updatetask.InventoryData.EveryoneMask;
5110 newTaskItem.NextOwnerMask = updatetask.InventoryData.NextOwnerMask; 5110 newTaskItem.NextPermissions = updatetask.InventoryData.NextOwnerMask;
5111 //newTaskItem.GroupOwned=updatetask.InventoryData.GroupOwned; 5111 //newTaskItem.GroupOwned=updatetask.InventoryData.GroupOwned;
5112 newTaskItem.Type = updatetask.InventoryData.Type; 5112 newTaskItem.Type = updatetask.InventoryData.Type;
5113 newTaskItem.InvType = updatetask.InventoryData.InvType; 5113 newTaskItem.InvType = updatetask.InventoryData.InvType;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 5caf0f0..d0c5842 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -919,22 +919,22 @@ namespace OpenSim.Region.Environment.Scenes
919 919
920 if ((destAgent != taskItem.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) 920 if ((destAgent != taskItem.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions())
921 { 921 {
922 agentItem.BasePermissions = taskItem.NextOwnerMask; 922 agentItem.BasePermissions = taskItem.NextPermissions;
923 agentItem.CurrentPermissions = taskItem.NextOwnerMask; 923 agentItem.CurrentPermissions = taskItem.NextPermissions;
924 agentItem.NextPermissions = taskItem.NextOwnerMask; 924 agentItem.NextPermissions = taskItem.NextPermissions;
925 agentItem.EveryOnePermissions = taskItem.EveryoneMask & taskItem.NextOwnerMask; 925 agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions;
926 } 926 }
927 else 927 else
928 { 928 {
929 agentItem.BasePermissions = taskItem.BaseMask; 929 agentItem.BasePermissions = taskItem.BasePermissions;
930 agentItem.CurrentPermissions = taskItem.OwnerMask; 930 agentItem.CurrentPermissions = taskItem.CurrentPermissions;
931 agentItem.NextPermissions = taskItem.NextOwnerMask; 931 agentItem.NextPermissions = taskItem.NextPermissions;
932 agentItem.EveryOnePermissions = taskItem.EveryoneMask; 932 agentItem.EveryOnePermissions = taskItem.EveryonePermissions;
933 } 933 }
934 934
935 if (!ExternalChecks.ExternalChecksBypassPermissions()) 935 if (!ExternalChecks.ExternalChecksBypassPermissions())
936 { 936 {
937 if ((taskItem.OwnerMask & (uint)PermissionMask.Copy) == 0) 937 if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
938 part.RemoveInventoryItem(itemId); 938 part.RemoveInventoryItem(itemId);
939 } 939 }
940 940
@@ -1083,26 +1083,26 @@ namespace OpenSim.Region.Environment.Scenes
1083 destTaskItem.ParentID = destPart.UUID; 1083 destTaskItem.ParentID = destPart.UUID;
1084 destTaskItem.ParentPartID = destPart.UUID; 1084 destTaskItem.ParentPartID = destPart.UUID;
1085 1085
1086 destTaskItem.BaseMask = srcTaskItem.BaseMask; 1086 destTaskItem.BasePermissions = srcTaskItem.BasePermissions;
1087 destTaskItem.EveryoneMask = srcTaskItem.EveryoneMask; 1087 destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions;
1088 destTaskItem.GroupMask = srcTaskItem.GroupMask; 1088 destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions;
1089 destTaskItem.OwnerMask = srcTaskItem.OwnerMask; 1089 destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions;
1090 destTaskItem.NextOwnerMask = srcTaskItem.NextOwnerMask; 1090 destTaskItem.NextPermissions = srcTaskItem.NextPermissions;
1091 destTaskItem.Flags = srcTaskItem.Flags; 1091 destTaskItem.Flags = srcTaskItem.Flags;
1092 1092
1093 if (destPart.OwnerID != part.OwnerID) 1093 if (destPart.OwnerID != part.OwnerID)
1094 { 1094 {
1095 if (ExternalChecks.ExternalChecksPropagatePermissions()) 1095 if (ExternalChecks.ExternalChecksPropagatePermissions())
1096 { 1096 {
1097 destTaskItem.OwnerMask = srcTaskItem.OwnerMask & 1097 destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
1098 srcTaskItem.NextOwnerMask; 1098 srcTaskItem.NextPermissions;
1099 destTaskItem.GroupMask = srcTaskItem.GroupMask & 1099 destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions &
1100 srcTaskItem.NextOwnerMask; 1100 srcTaskItem.NextPermissions;
1101 destTaskItem.EveryoneMask = srcTaskItem.EveryoneMask & 1101 destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions &
1102 srcTaskItem.NextOwnerMask; 1102 srcTaskItem.NextPermissions;
1103 destTaskItem.BaseMask = srcTaskItem.BaseMask & 1103 destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
1104 srcTaskItem.NextOwnerMask; 1104 srcTaskItem.NextPermissions;
1105 destTaskItem.OwnerMask |= 8; // Slam! 1105 destTaskItem.CurrentPermissions |= 8; // Slam!
1106 } 1106 }
1107 } 1107 }
1108 1108
@@ -1113,7 +1113,7 @@ namespace OpenSim.Region.Environment.Scenes
1113 1113
1114 destPart.AddInventoryItem(destTaskItem); 1114 destPart.AddInventoryItem(destTaskItem);
1115 1115
1116 if ((srcTaskItem.OwnerMask & (uint)PermissionMask.Copy) == 0) 1116 if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
1117 part.RemoveInventoryItem(itemId); 1117 part.RemoveInventoryItem(itemId);
1118 1118
1119 ScenePresence avatar; 1119 ScenePresence avatar;
@@ -1331,12 +1331,12 @@ namespace OpenSim.Region.Environment.Scenes
1331 taskItem.InvType = itemBase.InvType; 1331 taskItem.InvType = itemBase.InvType;
1332 taskItem.OwnerID = itemBase.Owner; 1332 taskItem.OwnerID = itemBase.Owner;
1333 taskItem.CreatorID = itemBase.Creator; 1333 taskItem.CreatorID = itemBase.Creator;
1334 taskItem.BaseMask = itemBase.BasePermissions; 1334 taskItem.BasePermissions = itemBase.BasePermissions;
1335 taskItem.OwnerMask = itemBase.CurrentPermissions; 1335 taskItem.CurrentPermissions = itemBase.CurrentPermissions;
1336 taskItem.EveryoneMask = itemBase.EveryOnePermissions; 1336 taskItem.EveryonePermissions = itemBase.EveryOnePermissions;
1337 taskItem.NextOwnerMask = itemBase.NextPermissions; 1337 taskItem.NextPermissions = itemBase.NextPermissions;
1338 taskItem.GroupID = itemBase.GroupID; 1338 taskItem.GroupID = itemBase.GroupID;
1339 taskItem.GroupMask = 0; 1339 taskItem.GroupPermissions = 0;
1340 taskItem.Flags = itemBase.Flags; 1340 taskItem.Flags = itemBase.Flags;
1341 taskItem.PermsGranter = LLUUID.Zero; 1341 taskItem.PermsGranter = LLUUID.Zero;
1342 taskItem.PermsMask = 0; 1342 taskItem.PermsMask = 0;
@@ -1409,26 +1409,26 @@ namespace OpenSim.Region.Environment.Scenes
1409 destTaskItem.ParentID = destPart.UUID; 1409 destTaskItem.ParentID = destPart.UUID;
1410 destTaskItem.ParentPartID = destPart.UUID; 1410 destTaskItem.ParentPartID = destPart.UUID;
1411 1411
1412 destTaskItem.BaseMask = srcTaskItem.BaseMask; 1412 destTaskItem.BasePermissions = srcTaskItem.BasePermissions;
1413 destTaskItem.EveryoneMask = srcTaskItem.EveryoneMask; 1413 destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions;
1414 destTaskItem.GroupMask = srcTaskItem.GroupMask; 1414 destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions;
1415 destTaskItem.OwnerMask = srcTaskItem.OwnerMask; 1415 destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions;
1416 destTaskItem.NextOwnerMask = srcTaskItem.NextOwnerMask; 1416 destTaskItem.NextPermissions = srcTaskItem.NextPermissions;
1417 destTaskItem.Flags = srcTaskItem.Flags; 1417 destTaskItem.Flags = srcTaskItem.Flags;
1418 1418
1419 if (destPart.OwnerID != srcPart.OwnerID) 1419 if (destPart.OwnerID != srcPart.OwnerID)
1420 { 1420 {
1421 if (ExternalChecks.ExternalChecksPropagatePermissions()) 1421 if (ExternalChecks.ExternalChecksPropagatePermissions())
1422 { 1422 {
1423 destTaskItem.OwnerMask = srcTaskItem.OwnerMask & 1423 destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
1424 srcTaskItem.NextOwnerMask; 1424 srcTaskItem.NextPermissions;
1425 destTaskItem.GroupMask = srcTaskItem.GroupMask & 1425 destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions &
1426 srcTaskItem.NextOwnerMask; 1426 srcTaskItem.NextPermissions;
1427 destTaskItem.EveryoneMask = srcTaskItem.EveryoneMask & 1427 destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions &
1428 srcTaskItem.NextOwnerMask; 1428 srcTaskItem.NextPermissions;
1429 destTaskItem.BaseMask = srcTaskItem.BaseMask & 1429 destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
1430 srcTaskItem.NextOwnerMask; 1430 srcTaskItem.NextPermissions;
1431 destTaskItem.OwnerMask |= 8; // Slam! 1431 destTaskItem.CurrentPermissions |= 8; // Slam!
1432 } 1432 }
1433 } 1433 }
1434 1434
@@ -2088,12 +2088,12 @@ namespace OpenSim.Region.Environment.Scenes
2088 { 2088 {
2089 if (ExternalChecks.ExternalChecksPropagatePermissions()) 2089 if (ExternalChecks.ExternalChecksPropagatePermissions())
2090 { 2090 {
2091 if ((item.OwnerMask & 8) != 0) 2091 if ((item.CurrentPermissions & 8) != 0)
2092 { 2092 {
2093 foreach (SceneObjectPart part in partList) 2093 foreach (SceneObjectPart part in partList)
2094 { 2094 {
2095 part.EveryoneMask = item.EveryoneMask; 2095 part.EveryoneMask = item.EveryonePermissions;
2096 part.NextOwnerMask = item.NextOwnerMask; 2096 part.NextOwnerMask = item.NextPermissions;
2097 } 2097 }
2098 } 2098 }
2099 group.ApplyNextOwnerPermissions(); 2099 group.ApplyNextOwnerPermissions();
@@ -2108,10 +2108,10 @@ namespace OpenSim.Region.Environment.Scenes
2108 part.OwnerID = item.OwnerID; 2108 part.OwnerID = item.OwnerID;
2109 part.ChangeInventoryOwner(item.OwnerID); 2109 part.ChangeInventoryOwner(item.OwnerID);
2110 } 2110 }
2111 else if ((item.OwnerMask & 8) != 0) // Slam! 2111 else if ((item.CurrentPermissions & 8) != 0) // Slam!
2112 { 2112 {
2113 part.EveryoneMask = item.EveryoneMask; 2113 part.EveryoneMask = item.EveryonePermissions;
2114 part.NextOwnerMask = item.NextOwnerMask; 2114 part.NextOwnerMask = item.NextPermissions;
2115 } 2115 }
2116 } 2116 }
2117 rootPart.TrimPermissions(); 2117 rootPart.TrimPermissions();
@@ -2127,7 +2127,7 @@ namespace OpenSim.Region.Environment.Scenes
2127 2127
2128 if (!ExternalChecks.ExternalChecksBypassPermissions()) 2128 if (!ExternalChecks.ExternalChecksBypassPermissions())
2129 { 2129 {
2130 if ((item.OwnerMask & (uint)PermissionMask.Copy) == 0) 2130 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
2131 sourcePart.RemoveInventoryItem(item.ItemID); 2131 sourcePart.RemoveInventoryItem(item.ItemID);
2132 } 2132 }
2133 return rootPart.ParentGroup; 2133 return rootPart.ParentGroup;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index 0696432..cc4891f 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -151,11 +151,11 @@ namespace OpenSim.Region.Environment.Scenes
151 taskItem.Type = item.AssetType; 151 taskItem.Type = item.AssetType;
152 taskItem.InvType = item.InvType; 152 taskItem.InvType = item.InvType;
153 153
154 taskItem.BaseMask = item.BasePermissions; 154 taskItem.BasePermissions = item.BasePermissions;
155 taskItem.OwnerMask = item.CurrentPermissions; 155 taskItem.CurrentPermissions = item.CurrentPermissions;
156 // FIXME: ignoring group permissions for now as they aren't stored in item 156 // FIXME: ignoring group permissions for now as they aren't stored in item
157 taskItem.EveryoneMask = item.EveryOnePermissions; 157 taskItem.EveryonePermissions = item.EveryOnePermissions;
158 taskItem.NextOwnerMask = item.NextPermissions; 158 taskItem.NextPermissions = item.NextPermissions;
159 taskItem.Flags = item.Flags; 159 taskItem.Flags = item.Flags;
160 // TODO: These are pending addition of those fields to TaskInventoryItem 160 // TODO: These are pending addition of those fields to TaskInventoryItem
161// taskItem.SalePrice = item.SalePrice; 161// taskItem.SalePrice = item.SalePrice;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 841b7b6..480c030 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -526,8 +526,8 @@ namespace OpenSim.Region.Environment.Scenes
526 { 526 {
527 LLUUID ownerID = item.OwnerID; 527 LLUUID ownerID = item.OwnerID;
528 uint everyoneMask = 0; 528 uint everyoneMask = 0;
529 uint baseMask = item.BaseMask; 529 uint baseMask = item.BasePermissions;
530 uint ownerMask = item.OwnerMask; 530 uint ownerMask = item.CurrentPermissions;
531 531
532 if (item.InvType == 10) // Script 532 if (item.InvType == 10) // Script
533 { 533 {
@@ -557,7 +557,7 @@ namespace OpenSim.Region.Environment.Scenes
557 invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(ownerMask)); 557 invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(ownerMask));
558 invString.AddNameValueLine("group_mask", Helpers.UIntToHexString(0)); 558 invString.AddNameValueLine("group_mask", Helpers.UIntToHexString(0));
559 invString.AddNameValueLine("everyone_mask", Helpers.UIntToHexString(everyoneMask)); 559 invString.AddNameValueLine("everyone_mask", Helpers.UIntToHexString(everyoneMask));
560 invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask)); 560 invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextPermissions));
561 561
562 invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); 562 invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
563 invString.AddNameValueLine("owner_id", ownerID.ToString()); 563 invString.AddNameValueLine("owner_id", ownerID.ToString());
@@ -680,28 +680,28 @@ namespace OpenSim.Region.Environment.Scenes
680 { 680 {
681 if (item.InvType != 6) 681 if (item.InvType != 6)
682 { 682 {
683 if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Copy) == 0) 683 if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0)
684 mask &= ~((uint)PermissionMask.Copy >> 13); 684 mask &= ~((uint)PermissionMask.Copy >> 13);
685 if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) 685 if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Transfer) == 0)
686 mask &= ~((uint)PermissionMask.Transfer >> 13); 686 mask &= ~((uint)PermissionMask.Transfer >> 13);
687 if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Modify) == 0) 687 if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Modify) == 0)
688 mask &= ~((uint)PermissionMask.Modify >> 13); 688 mask &= ~((uint)PermissionMask.Modify >> 13);
689 } 689 }
690 else 690 else
691 { 691 {
692 if ((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0) 692 if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0)
693 mask &= ~((uint)PermissionMask.Copy >> 13); 693 mask &= ~((uint)PermissionMask.Copy >> 13);
694 if ((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0) 694 if ((item.CurrentPermissions & ((uint)PermissionMask.Transfer >> 13)) == 0)
695 mask &= ~((uint)PermissionMask.Transfer >> 13); 695 mask &= ~((uint)PermissionMask.Transfer >> 13);
696 if ((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0) 696 if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0)
697 mask &= ~((uint)PermissionMask.Modify >> 13); 697 mask &= ~((uint)PermissionMask.Modify >> 13);
698 } 698 }
699 699
700 if ((item.OwnerMask & (uint)PermissionMask.Copy) == 0) 700 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
701 mask &= ~(uint)PermissionMask.Copy; 701 mask &= ~(uint)PermissionMask.Copy;
702 if ((item.OwnerMask & (uint)PermissionMask.Transfer) == 0) 702 if ((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)
703 mask &= ~(uint)PermissionMask.Transfer; 703 mask &= ~(uint)PermissionMask.Transfer;
704 if ((item.OwnerMask & (uint)PermissionMask.Modify) == 0) 704 if ((item.CurrentPermissions & (uint)PermissionMask.Modify) == 0)
705 mask &= ~(uint)PermissionMask.Modify; 705 mask &= ~(uint)PermissionMask.Modify;
706 } 706 }
707 return mask; 707 return mask;
@@ -717,16 +717,16 @@ namespace OpenSim.Region.Environment.Scenes
717 { 717 {
718 if (item.InvType == 6) 718 if (item.InvType == 6)
719 { 719 {
720 if ((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0) 720 if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0)
721 item.OwnerMask &= ~(uint)PermissionMask.Copy; 721 item.CurrentPermissions &= ~(uint)PermissionMask.Copy;
722 if ((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0) 722 if ((item.CurrentPermissions & ((uint)PermissionMask.Transfer >> 13)) == 0)
723 item.OwnerMask &= ~(uint)PermissionMask.Transfer; 723 item.CurrentPermissions &= ~(uint)PermissionMask.Transfer;
724 if ((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0) 724 if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0)
725 item.OwnerMask &= ~(uint)PermissionMask.Modify; 725 item.CurrentPermissions &= ~(uint)PermissionMask.Modify;
726 } 726 }
727 item.OwnerMask &= item.NextOwnerMask; 727 item.CurrentPermissions &= item.NextPermissions;
728 item.BaseMask &= item.NextOwnerMask; 728 item.BasePermissions &= item.NextPermissions;
729 item.EveryoneMask &= item.NextOwnerMask; 729 item.EveryonePermissions &= item.NextPermissions;
730 } 730 }
731 731
732 TriggerScriptChangedEvent(Changed.OWNER); 732 TriggerScriptChangedEvent(Changed.OWNER);
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 50691a5..2d5be27 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -3361,7 +3361,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3361 { 3361 {
3362 if (inv.Value.Name == name) 3362 if (inv.Value.Name == name)
3363 { 3363 {
3364 if ((inv.Value.OwnerMask & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) 3364 if ((inv.Value.CurrentPermissions & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
3365 { 3365 {
3366 return inv.Value.AssetID.ToString(); 3366 return inv.Value.AssetID.ToString();
3367 } 3367 }
@@ -6508,15 +6508,15 @@ namespace OpenSim.Region.ScriptEngine.Common
6508 switch (mask) 6508 switch (mask)
6509 { 6509 {
6510 case 0: 6510 case 0:
6511 return (int)inv.Value.BaseMask; 6511 return (int)inv.Value.BasePermissions;
6512 case 1: 6512 case 1:
6513 return (int)inv.Value.OwnerMask; 6513 return (int)inv.Value.CurrentPermissions;
6514 case 2: 6514 case 2:
6515 return (int)inv.Value.GroupMask; 6515 return (int)inv.Value.GroupPermissions;
6516 case 3: 6516 case 3:
6517 return (int)inv.Value.EveryoneMask; 6517 return (int)inv.Value.EveryonePermissions;
6518 case 4: 6518 case 4:
6519 return (int)inv.Value.NextOwnerMask; 6519 return (int)inv.Value.NextPermissions;
6520 } 6520 }
6521 } 6521 }
6522 } 6522 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a747586..9832cfc 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3302,7 +3302,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3302 { 3302 {
3303 if (inv.Value.Name == name) 3303 if (inv.Value.Name == name)
3304 { 3304 {
3305 if ((inv.Value.OwnerMask & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) 3305 if ((inv.Value.CurrentPermissions & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
3306 { 3306 {
3307 return inv.Value.AssetID.ToString(); 3307 return inv.Value.AssetID.ToString();
3308 } 3308 }
@@ -6287,15 +6287,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6287 switch (mask) 6287 switch (mask)
6288 { 6288 {
6289 case 0: 6289 case 0:
6290 return (int)inv.Value.BaseMask; 6290 return (int)inv.Value.BasePermissions;
6291 case 1: 6291 case 1:
6292 return (int)inv.Value.OwnerMask; 6292 return (int)inv.Value.CurrentPermissions;
6293 case 2: 6293 case 2:
6294 return (int)inv.Value.GroupMask; 6294 return (int)inv.Value.GroupPermissions;
6295 case 3: 6295 case 3:
6296 return (int)inv.Value.EveryoneMask; 6296 return (int)inv.Value.EveryonePermissions;
6297 case 4: 6297 case 4:
6298 return (int)inv.Value.NextOwnerMask; 6298 return (int)inv.Value.NextPermissions;
6299 } 6299 }
6300 } 6300 }
6301 } 6301 }