diff options
author | Teravus Ovares | 2007-12-07 07:42:03 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-07 07:42:03 +0000 |
commit | 57f666497bef6a68df9cc6e37ccf288c462a37b5 (patch) | |
tree | 4a1f4c3061ddca46fbe789191b45a6967a7a6889 /OpenSim/Region/Environment | |
parent | added timer_Script to OpenSim.ini.example (diff) | |
download | opensim-SC-57f666497bef6a68df9cc6e37ccf288c462a37b5.zip opensim-SC-57f666497bef6a68df9cc6e37ccf288c462a37b5.tar.gz opensim-SC-57f666497bef6a68df9cc6e37ccf288c462a37b5.tar.bz2 opensim-SC-57f666497bef6a68df9cc6e37ccf288c462a37b5.tar.xz |
* Added hacked support for 'anyone can move' and 'anyone can copy'.
* BACKUP YOUR PRIM BEFORE UPDATING TO THIS and then double check the prim permissions after applying it with a different avatar (then the master avatar or the prim owner avatar).
* Also, beware that any objects created under the old permission scheme may react oddly. They may automatically allow anyone to modify them, (which you'll then have to un-set).
* It's hacked support because when 'anyone can move is set', any avatar can modify the prim (texture, shape, scale, etc)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/PermissionManager.cs | 189 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 101 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 7 |
4 files changed, 163 insertions, 137 deletions
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs index 573fc29..37df180 100644 --- a/OpenSim/Region/Environment/PermissionManager.cs +++ b/OpenSim/Region/Environment/PermissionManager.cs | |||
@@ -35,7 +35,13 @@ namespace OpenSim.Region.Environment | |||
35 | public class PermissionManager | 35 | public class PermissionManager |
36 | { | 36 | { |
37 | protected Scene m_scene; | 37 | protected Scene m_scene; |
38 | 38 | ||
39 | // These are here for testing. They will be taken out | ||
40 | private uint PERM_ALL = (uint)2147483647; | ||
41 | private uint PERM_COPY = (uint)32768; | ||
42 | private uint PERM_MODIFY = (uint)16384; | ||
43 | private uint PERM_MOVE = (uint)524288; | ||
44 | private uint PERM_TRANS = (uint)8192; | ||
39 | // Bypasses the permissions engine (always returns OK) | 45 | // Bypasses the permissions engine (always returns OK) |
40 | // disable in any production environment | 46 | // disable in any production environment |
41 | // TODO: Change this to false when permissions are a desired default | 47 | // TODO: Change this to false when permissions are a desired default |
@@ -136,112 +142,7 @@ namespace OpenSim.Region.Environment | |||
136 | #region Object Permissions | 142 | #region Object Permissions |
137 | 143 | ||
138 | 144 | ||
139 | public virtual bool AnyoneCanCopyPermission(LLUUID user, LLUUID objId) | 145 | |
140 | { | ||
141 | |||
142 | // Default: deny | ||
143 | bool permission = false; | ||
144 | |||
145 | if (!m_scene.Entities.ContainsKey(objId)) | ||
146 | { | ||
147 | return false; | ||
148 | } | ||
149 | |||
150 | // If it's not an object, we cant edit it. | ||
151 | if (!(m_scene.Entities[objId] is SceneObjectGroup)) | ||
152 | { | ||
153 | return false; | ||
154 | } | ||
155 | |||
156 | SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objId]; | ||
157 | LLUUID taskOwner = null; | ||
158 | // Added this because at this point in time it wouldn't be wise for | ||
159 | // the administrator object permissions to take effect. | ||
160 | LLUUID objectOwner = task.OwnerID; | ||
161 | uint objectflags = task.RootPart.EveryoneMask; | ||
162 | |||
163 | // Object owners should be able to edit their own content | ||
164 | if (user == objectOwner) | ||
165 | permission = true; | ||
166 | |||
167 | // If the 'anybody can move' flag is set then allow anyone to copy it | ||
168 | if ((objectflags & (uint)LLObject.ObjectFlags.ObjectCopy ) != 0) | ||
169 | permission = true; | ||
170 | |||
171 | // Users should be able to edit what is over their land. | ||
172 | if (m_scene.LandManager.getLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y).landData.ownerID == | ||
173 | user) | ||
174 | permission = true; | ||
175 | |||
176 | // Estate users should be able to edit anything in the sim | ||
177 | if (IsEstateManager(user)) | ||
178 | permission = true; | ||
179 | |||
180 | // Admin objects should not be editable by the above | ||
181 | if (IsAdministrator(taskOwner)) | ||
182 | permission = false; | ||
183 | |||
184 | // Admin should be able to edit anything in the sim (including admin objects) | ||
185 | if (IsAdministrator(user)) | ||
186 | permission = true; | ||
187 | |||
188 | return permission; | ||
189 | |||
190 | } | ||
191 | |||
192 | |||
193 | public virtual bool AnyoneCanMovePermission(LLUUID user, LLUUID objId) | ||
194 | { | ||
195 | |||
196 | // Default: deny | ||
197 | bool permission = false; | ||
198 | |||
199 | if (!m_scene.Entities.ContainsKey(objId)) | ||
200 | { | ||
201 | return false; | ||
202 | } | ||
203 | |||
204 | // If it's not an object, we cant edit it. | ||
205 | if (!(m_scene.Entities[objId] is SceneObjectGroup)) | ||
206 | { | ||
207 | return false; | ||
208 | } | ||
209 | |||
210 | SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objId]; | ||
211 | LLUUID taskOwner = null; | ||
212 | // Added this because at this point in time it wouldn't be wise for | ||
213 | // the administrator object permissions to take effect. | ||
214 | LLUUID objectOwner = task.OwnerID; | ||
215 | uint objectflags = task.RootPart.EveryoneMask; | ||
216 | |||
217 | // Object owners should be able to edit their own content | ||
218 | if (user == objectOwner) | ||
219 | permission = true; | ||
220 | |||
221 | // If the 'anybody can move' flag is set then allow anyone to move it | ||
222 | if ((objectflags & (uint)LLObject.ObjectFlags.ObjectMove) != 0) | ||
223 | permission = true; | ||
224 | |||
225 | // Users should be able to edit what is over their land. | ||
226 | if (m_scene.LandManager.getLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y).landData.ownerID == | ||
227 | user) | ||
228 | permission = true; | ||
229 | |||
230 | // Estate users should be able to edit anything in the sim | ||
231 | if (IsEstateManager(user)) | ||
232 | permission = true; | ||
233 | |||
234 | // Admin objects should not be editable by the above | ||
235 | if (IsAdministrator(taskOwner)) | ||
236 | permission = false; | ||
237 | |||
238 | // Admin should be able to edit anything in the sim (including admin objects) | ||
239 | if (IsAdministrator(user)) | ||
240 | permission = true; | ||
241 | |||
242 | return permission; | ||
243 | |||
244 | } | ||
245 | public virtual uint GenerateClientFlags(LLUUID user, LLUUID objID) | 146 | public virtual uint GenerateClientFlags(LLUUID user, LLUUID objID) |
246 | { | 147 | { |
247 | if (!m_scene.Entities.ContainsKey(objID)) | 148 | if (!m_scene.Entities.ContainsKey(objID)) |
@@ -260,6 +161,9 @@ namespace OpenSim.Region.Environment | |||
260 | // Added this because at this point in time it wouldn't be wise for | 161 | // Added this because at this point in time it wouldn't be wise for |
261 | // the administrator object permissions to take effect. | 162 | // the administrator object permissions to take effect. |
262 | LLUUID objectOwner = task.OwnerID; | 163 | LLUUID objectOwner = task.OwnerID; |
164 | |||
165 | //return task.RootPart.ObjectFlags;task.RootPart.ObjectFlags | | ||
166 | |||
263 | uint OwnerMask = task.RootPart.ObjectFlags | task.RootPart.OwnerMask; | 167 | uint OwnerMask = task.RootPart.ObjectFlags | task.RootPart.OwnerMask; |
264 | uint GroupMask = task.RootPart.ObjectFlags | task.RootPart.GroupMask; | 168 | uint GroupMask = task.RootPart.ObjectFlags | task.RootPart.GroupMask; |
265 | uint EveryoneMask = task.RootPart.ObjectFlags | task.RootPart.EveryoneMask; | 169 | uint EveryoneMask = task.RootPart.ObjectFlags | task.RootPart.EveryoneMask; |
@@ -288,7 +192,20 @@ namespace OpenSim.Region.Environment | |||
288 | if (IsAdministrator(user)) | 192 | if (IsAdministrator(user)) |
289 | return OwnerMask; | 193 | return OwnerMask; |
290 | 194 | ||
291 | return 0; | 195 | if (((EveryoneMask & PERM_MOVE) != 0) || ((EveryoneMask & PERM_COPY) != 0)) |
196 | { | ||
197 | if ((EveryoneMask & PERM_MOVE) != 0) | ||
198 | OwnerMask &= ~PERM_MOVE; | ||
199 | |||
200 | if ((EveryoneMask & PERM_COPY) != 0) | ||
201 | OwnerMask &= ~PERM_COPY; | ||
202 | |||
203 | OwnerMask &= ~PERM_MODIFY; | ||
204 | OwnerMask &= ~PERM_TRANS; | ||
205 | |||
206 | return OwnerMask; | ||
207 | } | ||
208 | return EveryoneMask; | ||
292 | } | 209 | } |
293 | 210 | ||
294 | protected virtual bool GenericObjectPermission(LLUUID user, LLUUID objId) | 211 | protected virtual bool GenericObjectPermission(LLUUID user, LLUUID objId) |
@@ -353,15 +270,61 @@ namespace OpenSim.Region.Environment | |||
353 | return GenericObjectPermission(user, obj); | 270 | return GenericObjectPermission(user, obj); |
354 | } | 271 | } |
355 | 272 | ||
356 | public virtual bool CanReturnObject(LLUUID user, LLUUID obj) | 273 | public virtual bool CanEditObjectPosition(LLUUID user, LLUUID obj) |
357 | { | 274 | { |
358 | return GenericObjectPermission(user, obj); | 275 | bool permission = GenericObjectPermission(user,obj); |
276 | if (!permission) | ||
277 | { | ||
278 | if (!m_scene.Entities.ContainsKey(obj)) | ||
279 | { | ||
280 | return false; | ||
281 | } | ||
282 | |||
283 | // If it's not an object, we cant edit it. | ||
284 | if (!(m_scene.Entities[obj] is SceneObjectGroup)) | ||
285 | { | ||
286 | return false; | ||
287 | } | ||
288 | |||
289 | SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[obj]; | ||
290 | LLUUID taskOwner = null; | ||
291 | // Added this because at this point in time it wouldn't be wise for | ||
292 | // the administrator object permissions to take effect. | ||
293 | LLUUID objectOwner = task.OwnerID; | ||
294 | if ((task.RootPart.EveryoneMask & PERM_MOVE) != 0) | ||
295 | permission = true; | ||
296 | } | ||
297 | return permission; | ||
359 | } | 298 | } |
360 | |||
361 | public virtual bool CanCopyObject(LLUUID user, LLUUID obj) | 299 | public virtual bool CanCopyObject(LLUUID user, LLUUID obj) |
362 | { | 300 | { |
363 | return true; | 301 | bool permission = GenericObjectPermission(user, obj); |
364 | // return GenericObjectPermission(user, obj); | 302 | if (!permission) |
303 | { | ||
304 | if (!m_scene.Entities.ContainsKey(obj)) | ||
305 | { | ||
306 | return false; | ||
307 | } | ||
308 | |||
309 | // If it's not an object, we cant edit it. | ||
310 | if (!(m_scene.Entities[obj] is SceneObjectGroup)) | ||
311 | { | ||
312 | return false; | ||
313 | } | ||
314 | |||
315 | SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[obj]; | ||
316 | LLUUID taskOwner = null; | ||
317 | // Added this because at this point in time it wouldn't be wise for | ||
318 | // the administrator object permissions to take effect. | ||
319 | LLUUID objectOwner = task.OwnerID; | ||
320 | if ((task.RootPart.EveryoneMask & PERM_COPY) != 0) | ||
321 | permission = true; | ||
322 | } | ||
323 | return permission; | ||
324 | } | ||
325 | public virtual bool CanReturnObject(LLUUID user, LLUUID obj) | ||
326 | { | ||
327 | return GenericObjectPermission(user, obj); | ||
365 | } | 328 | } |
366 | 329 | ||
367 | #endregion | 330 | #endregion |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 04bdf5a..501f519 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -443,7 +443,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
443 | { | 443 | { |
444 | SceneObjectGroup group = GetGroupByPrim(localID); | 444 | SceneObjectGroup group = GetGroupByPrim(localID); |
445 | if (group != null) | 445 | if (group != null) |
446 | group.Resize(scale, localID); | 446 | { |
447 | if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID)) | ||
448 | { | ||
449 | group.Resize(scale, localID); | ||
450 | } | ||
451 | } | ||
447 | } | 452 | } |
448 | 453 | ||
449 | /// <summary> | 454 | /// <summary> |
@@ -473,7 +478,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
473 | { | 478 | { |
474 | SceneObjectGroup group = GetGroupByPrim(localID); | 479 | SceneObjectGroup group = GetGroupByPrim(localID); |
475 | if (group != null) | 480 | if (group != null) |
476 | group.UpdateSingleRotation(rot, localID); | 481 | { |
482 | if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID)) | ||
483 | { | ||
484 | group.UpdateSingleRotation(rot, localID); | ||
485 | } | ||
486 | } | ||
477 | } | 487 | } |
478 | 488 | ||
479 | /// <summary> | 489 | /// <summary> |
@@ -486,7 +496,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
486 | { | 496 | { |
487 | SceneObjectGroup group = GetGroupByPrim(localID); | 497 | SceneObjectGroup group = GetGroupByPrim(localID); |
488 | if (group != null) | 498 | if (group != null) |
489 | group.UpdateGroupRotation(rot); | 499 | { |
500 | if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID)) | ||
501 | { | ||
502 | group.UpdateGroupRotation(rot); | ||
503 | } | ||
504 | } | ||
490 | } | 505 | } |
491 | 506 | ||
492 | /// <summary> | 507 | /// <summary> |
@@ -500,14 +515,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
500 | { | 515 | { |
501 | SceneObjectGroup group = GetGroupByPrim(localID); | 516 | SceneObjectGroup group = GetGroupByPrim(localID); |
502 | if (group != null) | 517 | if (group != null) |
503 | group.UpdateGroupRotation(pos, rot); | 518 | { |
519 | if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID)) | ||
520 | { | ||
521 | group.UpdateGroupRotation(pos, rot); | ||
522 | } | ||
523 | } | ||
504 | } | 524 | } |
505 | 525 | ||
506 | public void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) | 526 | public void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) |
507 | { | 527 | { |
508 | SceneObjectGroup group = GetGroupByPrim(localID); | 528 | SceneObjectGroup group = GetGroupByPrim(localID); |
509 | if (group != null) | 529 | if (group != null) |
510 | group.UpdateSinglePosition(pos, localID); | 530 | { |
531 | if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID)) | ||
532 | { | ||
533 | group.UpdateSinglePosition(pos, localID); | ||
534 | } | ||
535 | } | ||
511 | } | 536 | } |
512 | 537 | ||
513 | /// <summary> | 538 | /// <summary> |
@@ -520,7 +545,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
520 | { | 545 | { |
521 | SceneObjectGroup group = GetGroupByPrim(localID); | 546 | SceneObjectGroup group = GetGroupByPrim(localID); |
522 | if (group != null) | 547 | if (group != null) |
523 | group.UpdateGroupPosition(pos); | 548 | { |
549 | if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID)) | ||
550 | { | ||
551 | group.UpdateGroupPosition(pos); | ||
552 | } | ||
553 | } | ||
524 | } | 554 | } |
525 | 555 | ||
526 | /// <summary> | 556 | /// <summary> |
@@ -533,7 +563,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
533 | { | 563 | { |
534 | SceneObjectGroup group = GetGroupByPrim(localID); | 564 | SceneObjectGroup group = GetGroupByPrim(localID); |
535 | if (group != null) | 565 | if (group != null) |
536 | group.UpdateTextureEntry(localID, texture); | 566 | { |
567 | if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID)) | ||
568 | { | ||
569 | group.UpdateTextureEntry(localID, texture); | ||
570 | } | ||
571 | } | ||
537 | } | 572 | } |
538 | 573 | ||
539 | /// <summary> | 574 | /// <summary> |
@@ -546,17 +581,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
546 | { | 581 | { |
547 | SceneObjectGroup group = GetGroupByPrim(localID); | 582 | SceneObjectGroup group = GetGroupByPrim(localID); |
548 | if (group != null) | 583 | if (group != null) |
549 | group.UpdatePrimFlags(localID, (ushort)packet.Type, true, packet.ToBytes()); | 584 | { |
550 | //System.Console.WriteLine("Got primupdate packet: " + packet.UsePhysics.ToString()); | 585 | if (PermissionsMngr.CanEditObject(remoteClient.AgentId, group.UUID)) |
586 | { | ||
587 | group.UpdatePrimFlags(localID, (ushort)packet.Type, true, packet.ToBytes()); | ||
588 | } | ||
589 | } | ||
590 | |||
551 | } | 591 | } |
552 | 592 | ||
553 | public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) | 593 | public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) |
554 | { | 594 | { |
555 | if (PermissionsMngr.CanEditObject(remoteClient.AgentId, objectID) || PermissionsMngr.AnyoneCanMovePermission(remoteClient.AgentId, objectID)) | 595 | SceneObjectGroup group = GetGroupByPrim(objectID); |
596 | if (group != null) | ||
556 | { | 597 | { |
557 | SceneObjectGroup group = GetGroupByPrim(objectID); | 598 | if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID)) |
558 | if (group != null) | 599 | { |
559 | group.GrabMovement(offset, pos, remoteClient); | 600 | group.GrabMovement(offset, pos, remoteClient); |
601 | } | ||
560 | } | 602 | } |
561 | } | 603 | } |
562 | 604 | ||
@@ -565,11 +607,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
565 | /// </summary> | 607 | /// </summary> |
566 | /// <param name="primLocalID"></param> | 608 | /// <param name="primLocalID"></param> |
567 | /// <param name="description"></param> | 609 | /// <param name="description"></param> |
568 | public void PrimName(uint primLocalID, string name) | 610 | public void PrimName(IClientAPI remoteClient, uint primLocalID, string name) |
569 | { | 611 | { |
570 | SceneObjectGroup group = GetGroupByPrim(primLocalID); | 612 | SceneObjectGroup group = GetGroupByPrim(primLocalID); |
571 | if (group != null) | 613 | if (group != null) |
572 | group.SetPartName(name, primLocalID); | 614 | { |
615 | if (PermissionsMngr.CanEditObject(remoteClient.AgentId, group.UUID)) | ||
616 | { | ||
617 | group.SetPartName(name, primLocalID); | ||
618 | } | ||
619 | } | ||
573 | } | 620 | } |
574 | 621 | ||
575 | /// <summary> | 622 | /// <summary> |
@@ -577,21 +624,30 @@ namespace OpenSim.Region.Environment.Scenes | |||
577 | /// </summary> | 624 | /// </summary> |
578 | /// <param name="primLocalID"></param> | 625 | /// <param name="primLocalID"></param> |
579 | /// <param name="description"></param> | 626 | /// <param name="description"></param> |
580 | public void PrimDescription(uint primLocalID, string description) | 627 | public void PrimDescription(IClientAPI remoteClient, uint primLocalID, string description) |
581 | { | 628 | { |
582 | SceneObjectGroup group = GetGroupByPrim(primLocalID); | 629 | SceneObjectGroup group = GetGroupByPrim(primLocalID); |
583 | if (group != null) | 630 | if (group != null) |
584 | group.SetPartDescription(description, primLocalID); | 631 | { |
632 | if (PermissionsMngr.CanEditObject(remoteClient.AgentId, group.UUID)) | ||
633 | { | ||
634 | group.SetPartDescription(description, primLocalID); | ||
635 | } | ||
636 | } | ||
585 | } | 637 | } |
586 | 638 | ||
587 | public void UpdateExtraParam(LLUUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data) | 639 | public void UpdateExtraParam(LLUUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data) |
588 | { | 640 | { |
589 | SceneObjectGroup group = GetGroupByPrim(primLocalID); | 641 | SceneObjectGroup group = GetGroupByPrim(primLocalID); |
590 | if (this.m_parentScene.PermissionsMngr.CanEditObject(agentID, group.GetPartsFullID(primLocalID))) | 642 | |
643 | if (group != null) | ||
591 | { | 644 | { |
592 | if (group != null) | 645 | if (PermissionsMngr.CanEditObject(agentID, group.UUID)) |
646 | { | ||
593 | group.UpdateExtraParam(primLocalID, type, inUse, data); | 647 | group.UpdateExtraParam(primLocalID, type, inUse, data); |
648 | } | ||
594 | } | 649 | } |
650 | |||
595 | } | 651 | } |
596 | 652 | ||
597 | /// <summary> | 653 | /// <summary> |
@@ -602,10 +658,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
602 | public void UpdatePrimShape(LLUUID agentID, uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock) | 658 | public void UpdatePrimShape(LLUUID agentID, uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock) |
603 | { | 659 | { |
604 | SceneObjectGroup group = GetGroupByPrim(primLocalID); | 660 | SceneObjectGroup group = GetGroupByPrim(primLocalID); |
605 | if (this.m_parentScene.PermissionsMngr.CanEditObject(agentID, group.GetPartsFullID(primLocalID))) | 661 | if (group != null) |
606 | { | 662 | { |
607 | if (group != null) | 663 | if (PermissionsMngr.CanEditObjectPosition(agentID, group.GetPartsFullID(primLocalID))) |
664 | { | ||
665 | |||
608 | group.UpdateShape(shapeBlock, primLocalID); | 666 | group.UpdateShape(shapeBlock, primLocalID); |
667 | } | ||
609 | } | 668 | } |
610 | } | 669 | } |
611 | 670 | ||
@@ -724,7 +783,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
724 | 783 | ||
725 | if (originPrim != null) | 784 | if (originPrim != null) |
726 | { | 785 | { |
727 | if (PermissionsMngr.CanCopyObject(AgentID, originPrim.UUID) || PermissionsMngr.AnyoneCanCopyPermission(AgentID, originPrim.UUID)) | 786 | if (PermissionsMngr.CanCopyObject(AgentID, originPrim.UUID)) |
728 | { | 787 | { |
729 | SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID); | 788 | SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID); |
730 | copy.AbsolutePosition = copy.AbsolutePosition + offset; | 789 | copy.AbsolutePosition = copy.AbsolutePosition + offset; |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index dbcd332..6c8b3bf 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -448,6 +448,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
448 | item.parentFolderID = DeRezPacket.AgentBlock.DestinationID; | 448 | item.parentFolderID = DeRezPacket.AgentBlock.DestinationID; |
449 | item.inventoryCurrentPermissions = 2147483647; | 449 | item.inventoryCurrentPermissions = 2147483647; |
450 | item.inventoryNextPermissions = 2147483647; | 450 | item.inventoryNextPermissions = 2147483647; |
451 | item.inventoryEveryOnePermissions = ((SceneObjectGroup)selectedEnt).RootPart.EveryoneMask; | ||
452 | item.inventoryBasePermissions = ((SceneObjectGroup)selectedEnt).RootPart.BaseMask; | ||
453 | item.inventoryCurrentPermissions = ((SceneObjectGroup)selectedEnt).RootPart.OwnerMask; | ||
451 | 454 | ||
452 | userInfo.AddItem(remoteClient.AgentId, item); | 455 | userInfo.AddItem(remoteClient.AgentId, item); |
453 | remoteClient.SendInventoryItemCreateUpdate(item); | 456 | remoteClient.SendInventoryItemCreateUpdate(item); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 238e78a..bf02e8d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -851,7 +851,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
851 | m_flags |= flag; | 851 | m_flags |= flag; |
852 | 852 | ||
853 | } | 853 | } |
854 | uint currflag = (uint)m_flags; | 854 | //uint currflag = (uint)m_flags; |
855 | //System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + m_flags.ToString()); | 855 | //System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + m_flags.ToString()); |
856 | //ScheduleFullUpdate(); | 856 | //ScheduleFullUpdate(); |
857 | } | 857 | } |
@@ -1295,7 +1295,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1295 | //EveryoneMask |= (uint)57344; | 1295 | //EveryoneMask |= (uint)57344; |
1296 | 1296 | ||
1297 | } | 1297 | } |
1298 | ScheduleFullUpdate(); | 1298 | //ScheduleFullUpdate(); |
1299 | SendFullUpdateToAllClients(); | ||
1299 | } | 1300 | } |
1300 | //Field 16 = NextownerMask | 1301 | //Field 16 = NextownerMask |
1301 | if (field == (byte)16) | 1302 | if (field == (byte)16) |
@@ -1308,7 +1309,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1308 | { | 1309 | { |
1309 | NextOwnerMask |= mask; | 1310 | NextOwnerMask |= mask; |
1310 | } | 1311 | } |
1311 | ScheduleFullUpdate(); | 1312 | SendFullUpdateToAllClients(); |
1312 | } | 1313 | } |
1313 | 1314 | ||
1314 | } | 1315 | } |