aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/PermissionManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/PermissionManager.cs27
1 files changed, 10 insertions, 17 deletions
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs
index 5658be7..fd8387b 100644
--- a/OpenSim/Region/Environment/PermissionManager.cs
+++ b/OpenSim/Region/Environment/PermissionManager.cs
@@ -226,21 +226,14 @@ namespace OpenSim.Region.Environment
226 // Outside of this method, they should never be added to objectflags! 226 // Outside of this method, they should never be added to objectflags!
227 // -teravus 227 // -teravus
228 228
229 if (!m_scene.Entities.ContainsKey(objID)) 229 SceneObjectPart task=m_scene.GetSceneObjectPart(objID);
230 { 230
231 return 0; 231 // this shouldn't ever happen.. return no permissions/objectflags.
232 } 232 if (task == null)
233 233 return (uint)0;
234 // If it's not an object, we cant edit it.
235 if (!(m_scene.Entities[objID] is SceneObjectGroup))
236 {
237 return 0;
238 }
239
240 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objID];
241 LLUUID objectOwner = task.OwnerID;
242 234
243 uint objflags = task.RootPart.ObjectFlags; 235 uint objflags = task.GetEffectiveObjectFlags();
236 LLUUID objectOwner = task.OwnerID;
244 237
245 238
246 // Remove any of the objectFlags that are temporary. These will get added back if appropriate 239 // Remove any of the objectFlags that are temporary. These will get added back if appropriate
@@ -257,14 +250,14 @@ namespace OpenSim.Region.Environment
257 250
258 // Creating the three ObjectFlags options for this method to choose from. 251 // Creating the three ObjectFlags options for this method to choose from.
259 // Customize the OwnerMask 252 // Customize the OwnerMask
260 uint objectOwnerMask = ApplyObjectModifyMasks(task.RootPart.OwnerMask, objflags); 253 uint objectOwnerMask = ApplyObjectModifyMasks(task.OwnerMask, objflags);
261 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectYouOwner; 254 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectYouOwner;
262 255
263 // Customize the GroupMask 256 // Customize the GroupMask
264 uint objectGroupMask = ApplyObjectModifyMasks(task.RootPart.GroupMask, objflags); 257 uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags);
265 258
266 // Customize the EveryoneMask 259 // Customize the EveryoneMask
267 uint objectEveryoneMask = ApplyObjectModifyMasks(task.RootPart.EveryoneMask, objflags); 260 uint objectEveryoneMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags);
268 261
269 262
270 // Hack to allow collaboration until Groups and Group Permissions are implemented 263 // Hack to allow collaboration until Groups and Group Permissions are implemented