diff options
author | Adam Frisby | 2008-04-23 13:22:06 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-23 13:22:06 +0000 |
commit | e456cb7533dff72aa22a87f261a758e294e707b1 (patch) | |
tree | 8cc321c8b4438acd298bb756768ba124feb09661 /OpenSim/Region/Environment/PermissionManager.cs | |
parent | * Patch #1026 - llDialog support -- Thanks Melanie! (diff) | |
download | opensim-SC_OLD-e456cb7533dff72aa22a87f261a758e294e707b1.zip opensim-SC_OLD-e456cb7533dff72aa22a87f261a758e294e707b1.tar.gz opensim-SC_OLD-e456cb7533dff72aa22a87f261a758e294e707b1.tar.bz2 opensim-SC_OLD-e456cb7533dff72aa22a87f261a758e294e707b1.tar.xz |
* Patch for #973 - Object Rez from Inventory ignores permissions - Thanks tglion!
Diffstat (limited to 'OpenSim/Region/Environment/PermissionManager.cs')
-rw-r--r-- | OpenSim/Region/Environment/PermissionManager.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs index 12ef110..0343d21 100644 --- a/OpenSim/Region/Environment/PermissionManager.cs +++ b/OpenSim/Region/Environment/PermissionManager.cs | |||
@@ -159,6 +159,44 @@ namespace OpenSim.Region.Environment | |||
159 | return permission; | 159 | return permission; |
160 | } | 160 | } |
161 | 161 | ||
162 | /// <summary> | ||
163 | /// Permissions check - can user enter an object? | ||
164 | /// </summary> | ||
165 | /// <param name="user">User attempting move an object</param> | ||
166 | /// <param name="oldPos">Source object-position</param> | ||
167 | /// <param name="newPos">Target object-position</param> | ||
168 | /// <returns>Has permission?</returns> | ||
169 | public virtual bool CanObjectEntry(LLUUID user, LLVector3 oldPos, LLVector3 newPos) | ||
170 | { | ||
171 | ILandObject land1 = m_scene.LandChannel.getLandObject(oldPos.X, oldPos.Y); | ||
172 | ILandObject land2 = m_scene.LandChannel.getLandObject(newPos.X, newPos.Y); | ||
173 | if (land1 == null || land2 == null) | ||
174 | { | ||
175 | return false; | ||
176 | } | ||
177 | |||
178 | if (land1.landData.globalID == land2.landData.globalID) | ||
179 | { | ||
180 | return true; | ||
181 | } | ||
182 | |||
183 | if ((land2.landData.landFlags & ((int)Parcel.ParcelFlags.AllowAllObjectEntry)) != 0) | ||
184 | { | ||
185 | return true; | ||
186 | } | ||
187 | |||
188 | //TODO: check for group rights | ||
189 | |||
190 | if (GenericParcelPermission(user, newPos)) | ||
191 | { | ||
192 | return true; | ||
193 | } | ||
194 | |||
195 | SendPermissionError(user, "Not allowed to move objects in this parcel!"); | ||
196 | |||
197 | return false; | ||
198 | } | ||
199 | |||
162 | #region Object Permissions | 200 | #region Object Permissions |
163 | 201 | ||
164 | public virtual uint GenerateClientFlags(LLUUID user, LLUUID objID) | 202 | public virtual uint GenerateClientFlags(LLUUID user, LLUUID objID) |