diff options
author | Diva Canto | 2010-01-15 17:24:41 -0800 |
---|---|---|
committer | Diva Canto | 2010-01-15 17:24:41 -0800 |
commit | 32bfbdab6f6bbbfaae0df0ab410af7b9c42a3a4f (patch) | |
tree | e20c1afa3edc76101eea15765a447b13b3c4946e /OpenSim/Region/CoreModules/World | |
parent | Comment (diff) | |
parent | Merge branch 'master' into presence-refactor (diff) | |
download | opensim-SC_OLD-32bfbdab6f6bbbfaae0df0ab410af7b9c42a3a4f.zip opensim-SC_OLD-32bfbdab6f6bbbfaae0df0ab410af7b9c42a3a4f.tar.gz opensim-SC_OLD-32bfbdab6f6bbbfaae0df0ab410af7b9c42a3a4f.tar.bz2 opensim-SC_OLD-32bfbdab6f6bbbfaae0df0ab410af7b9c42a3a4f.tar.xz |
Merge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/opensim into presence-refactor
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
3 files changed, 313 insertions, 93 deletions
diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs new file mode 100644 index 0000000..8b5a413 --- /dev/null +++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs | |||
@@ -0,0 +1,157 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using Nini.Config; | ||
33 | using OpenMetaverse; | ||
34 | using OpenSim.Framework; | ||
35 | using OpenSim.Framework.Console; | ||
36 | using OpenSim.Region.Framework.Interfaces; | ||
37 | using OpenSim.Region.Framework.Scenes; | ||
38 | using OpenSim.Services.Interfaces; | ||
39 | |||
40 | namespace OpenSim.Region.CoreModules.World | ||
41 | { | ||
42 | public class AccessModule : ISharedRegionModule | ||
43 | { | ||
44 | private static readonly ILog m_log = | ||
45 | LogManager.GetLogger( | ||
46 | MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
48 | private List<Scene> m_SceneList = new List<Scene>(); | ||
49 | |||
50 | public void Initialise(IConfigSource config) | ||
51 | { | ||
52 | MainConsole.Instance.Commands.AddCommand("access", true, | ||
53 | "login enable", | ||
54 | "login enable", | ||
55 | "Enable simulator logins", | ||
56 | String.Empty, | ||
57 | HandleLoginCommand); | ||
58 | |||
59 | MainConsole.Instance.Commands.AddCommand("access", true, | ||
60 | "login disable", | ||
61 | "login disable", | ||
62 | "Disable simulator logins", | ||
63 | String.Empty, | ||
64 | HandleLoginCommand); | ||
65 | |||
66 | MainConsole.Instance.Commands.AddCommand("access", true, | ||
67 | "login status", | ||
68 | "login status", | ||
69 | "Show login status", | ||
70 | String.Empty, | ||
71 | HandleLoginCommand); | ||
72 | } | ||
73 | |||
74 | public void PostInitialise() | ||
75 | { | ||
76 | } | ||
77 | |||
78 | public void Close() | ||
79 | { | ||
80 | } | ||
81 | |||
82 | public string Name | ||
83 | { | ||
84 | get { return "AccessModule"; } | ||
85 | } | ||
86 | |||
87 | public Type ReplaceableInterface | ||
88 | { | ||
89 | get { return null; } | ||
90 | } | ||
91 | |||
92 | public void AddRegion(Scene scene) | ||
93 | { | ||
94 | if (!m_SceneList.Contains(scene)) | ||
95 | m_SceneList.Add(scene); | ||
96 | } | ||
97 | |||
98 | public void RemoveRegion(Scene scene) | ||
99 | { | ||
100 | m_SceneList.Remove(scene); | ||
101 | } | ||
102 | |||
103 | public void RegionLoaded(Scene scene) | ||
104 | { | ||
105 | } | ||
106 | |||
107 | public void HandleLoginCommand(string module, string[] cmd) | ||
108 | { | ||
109 | if ((Scene)MainConsole.Instance.ConsoleScene == null) | ||
110 | { | ||
111 | foreach (Scene s in m_SceneList) | ||
112 | { | ||
113 | if(!ProcessCommand(s, cmd)) | ||
114 | break; | ||
115 | } | ||
116 | } | ||
117 | else | ||
118 | { | ||
119 | ProcessCommand((Scene)MainConsole.Instance.ConsoleScene, cmd); | ||
120 | } | ||
121 | } | ||
122 | |||
123 | bool ProcessCommand(Scene scene, string[] cmd) | ||
124 | { | ||
125 | if (cmd.Length < 2) | ||
126 | { | ||
127 | MainConsole.Instance.Output("Syntax: login enable|disable|status"); | ||
128 | return false; | ||
129 | } | ||
130 | |||
131 | switch (cmd[1]) | ||
132 | { | ||
133 | case "enable": | ||
134 | if (scene.LoginsDisabled) | ||
135 | MainConsole.Instance.Output(String.Format("Enabling logins for region {0}", scene.RegionInfo.RegionName)); | ||
136 | scene.LoginsDisabled = false; | ||
137 | break; | ||
138 | case "disable": | ||
139 | if (!scene.LoginsDisabled) | ||
140 | MainConsole.Instance.Output(String.Format("Disabling logins for region {0}", scene.RegionInfo.RegionName)); | ||
141 | scene.LoginsDisabled = true; | ||
142 | break; | ||
143 | case "status": | ||
144 | if (scene.LoginsDisabled) | ||
145 | MainConsole.Instance.Output(String.Format("Login in {0} are disabled", scene.RegionInfo.RegionName)); | ||
146 | else | ||
147 | MainConsole.Instance.Output(String.Format("Login in {0} are enabled", scene.RegionInfo.RegionName)); | ||
148 | break; | ||
149 | default: | ||
150 | MainConsole.Instance.Output("Syntax: login enable|disable|status"); | ||
151 | return false; | ||
152 | } | ||
153 | |||
154 | return true; | ||
155 | } | ||
156 | } | ||
157 | } | ||
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 2109336..189efdc 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -72,10 +72,21 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
72 | m_scene.RegionInfo.EstateSettings.AbuseEmail, | 72 | m_scene.RegionInfo.EstateSettings.AbuseEmail, |
73 | estateOwner); | 73 | estateOwner); |
74 | 74 | ||
75 | remote_client.SendEstateManagersList(invoice, | 75 | remote_client.SendEstateList(invoice, |
76 | (int)Constants.EstateAccessCodex.EstateManagers, | ||
76 | m_scene.RegionInfo.EstateSettings.EstateManagers, | 77 | m_scene.RegionInfo.EstateSettings.EstateManagers, |
77 | m_scene.RegionInfo.EstateSettings.EstateID); | 78 | m_scene.RegionInfo.EstateSettings.EstateID); |
78 | 79 | ||
80 | remote_client.SendEstateList(invoice, | ||
81 | (int)Constants.EstateAccessCodex.AccessOptions, | ||
82 | m_scene.RegionInfo.EstateSettings.EstateAccess, | ||
83 | m_scene.RegionInfo.EstateSettings.EstateID); | ||
84 | |||
85 | remote_client.SendEstateList(invoice, | ||
86 | (int)Constants.EstateAccessCodex.AllowedGroups, | ||
87 | m_scene.RegionInfo.EstateSettings.EstateGroups, | ||
88 | m_scene.RegionInfo.EstateSettings.EstateID); | ||
89 | |||
79 | remote_client.SendBannedUserList(invoice, | 90 | remote_client.SendBannedUserList(invoice, |
80 | m_scene.RegionInfo.EstateSettings.EstateBans, | 91 | m_scene.RegionInfo.EstateSettings.EstateBans, |
81 | m_scene.RegionInfo.EstateSettings.EstateID); | 92 | m_scene.RegionInfo.EstateSettings.EstateID); |
@@ -228,127 +239,176 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
228 | if (user == m_scene.RegionInfo.EstateSettings.EstateOwner) | 239 | if (user == m_scene.RegionInfo.EstateSettings.EstateOwner) |
229 | return; // never process EO | 240 | return; // never process EO |
230 | 241 | ||
231 | switch (estateAccessType) | 242 | if ((estateAccessType & 4) != 0) // User add |
232 | { | 243 | { |
233 | case 64: | 244 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) |
234 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | 245 | { |
235 | { | 246 | m_scene.RegionInfo.EstateSettings.AddEstateUser(user); |
236 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | 247 | m_scene.RegionInfo.EstateSettings.Save(); |
237 | 248 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID); | |
238 | bool alreadyInList = false; | 249 | } |
239 | 250 | else | |
240 | for (int i = 0; i < banlistcheck.Length; i++) | 251 | { |
241 | { | 252 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); |
242 | if (user == banlistcheck[i].BannedUserID) | 253 | } |
243 | { | ||
244 | alreadyInList = true; | ||
245 | break; | ||
246 | } | ||
247 | |||
248 | } | ||
249 | if (!alreadyInList) | ||
250 | { | ||
251 | 254 | ||
252 | EstateBan item = new EstateBan(); | 255 | } |
256 | if ((estateAccessType & 8) != 0) // User remove | ||
257 | { | ||
258 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
259 | { | ||
260 | m_scene.RegionInfo.EstateSettings.RemoveEstateUser(user); | ||
261 | m_scene.RegionInfo.EstateSettings.Save(); | ||
253 | 262 | ||
254 | item.BannedUserID = user; | 263 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID); |
255 | item.EstateID = m_scene.RegionInfo.EstateSettings.EstateID; | 264 | } |
256 | item.BannedHostAddress = "0.0.0.0"; | 265 | else |
257 | item.BannedHostIPMask = "0.0.0.0"; | 266 | { |
267 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
268 | } | ||
269 | } | ||
270 | if ((estateAccessType & 16) != 0) // Group add | ||
271 | { | ||
272 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
273 | { | ||
274 | m_scene.RegionInfo.EstateSettings.AddEstateGroup(user); | ||
275 | m_scene.RegionInfo.EstateSettings.Save(); | ||
276 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateGroups, m_scene.RegionInfo.EstateSettings.EstateID); | ||
277 | } | ||
278 | else | ||
279 | { | ||
280 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
281 | } | ||
282 | } | ||
283 | if ((estateAccessType & 32) != 0) // Group remove | ||
284 | { | ||
285 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
286 | { | ||
287 | m_scene.RegionInfo.EstateSettings.RemoveEstateGroup(user); | ||
288 | m_scene.RegionInfo.EstateSettings.Save(); | ||
258 | 289 | ||
259 | m_scene.RegionInfo.EstateSettings.AddBan(item); | 290 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateGroups, m_scene.RegionInfo.EstateSettings.EstateID); |
260 | m_scene.RegionInfo.EstateSettings.Save(); | 291 | } |
292 | else | ||
293 | { | ||
294 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
295 | } | ||
296 | } | ||
297 | if ((estateAccessType & 64) != 0) // Ban add | ||
298 | { | ||
299 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | ||
300 | { | ||
301 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | ||
261 | 302 | ||
262 | ScenePresence s = m_scene.GetScenePresence(user); | 303 | bool alreadyInList = false; |
263 | if (s != null) | ||
264 | { | ||
265 | if (!s.IsChildAgent) | ||
266 | { | ||
267 | s.ControllingClient.SendTeleportLocationStart(); | ||
268 | m_scene.TeleportClientHome(user, s.ControllingClient); | ||
269 | } | ||
270 | } | ||
271 | 304 | ||
272 | } | 305 | for (int i = 0; i < banlistcheck.Length; i++) |
273 | else | 306 | { |
307 | if (user == banlistcheck[i].BannedUserID) | ||
274 | { | 308 | { |
275 | remote_client.SendAlertMessage("User is already on the region ban list"); | 309 | alreadyInList = true; |
310 | break; | ||
276 | } | 311 | } |
277 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | 312 | |
278 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | ||
279 | } | ||
280 | else | ||
281 | { | ||
282 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
283 | } | 313 | } |
284 | break; | 314 | if (!alreadyInList) |
285 | case 128: | ||
286 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | ||
287 | { | 315 | { |
288 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | ||
289 | 316 | ||
290 | bool alreadyInList = false; | 317 | EstateBan item = new EstateBan(); |
291 | EstateBan listitem = null; | 318 | |
319 | item.BannedUserID = user; | ||
320 | item.EstateID = m_scene.RegionInfo.EstateSettings.EstateID; | ||
321 | item.BannedHostAddress = "0.0.0.0"; | ||
322 | item.BannedHostIPMask = "0.0.0.0"; | ||
292 | 323 | ||
293 | for (int i = 0; i < banlistcheck.Length; i++) | 324 | m_scene.RegionInfo.EstateSettings.AddBan(item); |
325 | m_scene.RegionInfo.EstateSettings.Save(); | ||
326 | |||
327 | ScenePresence s = m_scene.GetScenePresence(user); | ||
328 | if (s != null) | ||
294 | { | 329 | { |
295 | if (user == banlistcheck[i].BannedUserID) | 330 | if (!s.IsChildAgent) |
296 | { | 331 | { |
297 | alreadyInList = true; | 332 | s.ControllingClient.SendTeleportLocationStart(); |
298 | listitem = banlistcheck[i]; | 333 | m_scene.TeleportClientHome(user, s.ControllingClient); |
299 | break; | ||
300 | } | 334 | } |
301 | |||
302 | } | 335 | } |
303 | if (alreadyInList && listitem != null) | 336 | |
304 | { | ||
305 | m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); | ||
306 | m_scene.RegionInfo.EstateSettings.Save(); | ||
307 | } | ||
308 | else | ||
309 | { | ||
310 | remote_client.SendAlertMessage("User is not on the region ban list"); | ||
311 | } | ||
312 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | ||
313 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | ||
314 | } | 337 | } |
315 | else | 338 | else |
316 | { | 339 | { |
317 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | 340 | remote_client.SendAlertMessage("User is already on the region ban list"); |
318 | } | 341 | } |
319 | break; | 342 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); |
320 | case 256: | 343 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); |
344 | } | ||
345 | else | ||
346 | { | ||
347 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
348 | } | ||
349 | } | ||
350 | if ((estateAccessType & 128) != 0) // Ban remove | ||
351 | { | ||
352 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | ||
353 | { | ||
354 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | ||
321 | 355 | ||
322 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | 356 | bool alreadyInList = false; |
323 | { | 357 | EstateBan listitem = null; |
324 | m_scene.RegionInfo.EstateSettings.AddEstateManager(user); | 358 | |
325 | m_scene.RegionInfo.EstateSettings.Save(); | 359 | for (int i = 0; i < banlistcheck.Length; i++) |
326 | remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
327 | } | ||
328 | else | ||
329 | { | 360 | { |
330 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | 361 | if (user == banlistcheck[i].BannedUserID) |
331 | } | 362 | { |
363 | alreadyInList = true; | ||
364 | listitem = banlistcheck[i]; | ||
365 | break; | ||
366 | } | ||
332 | 367 | ||
333 | break; | 368 | } |
334 | case 512: | 369 | if (alreadyInList && listitem != null) |
335 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
336 | { | 370 | { |
337 | m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); | 371 | m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); |
338 | m_scene.RegionInfo.EstateSettings.Save(); | 372 | m_scene.RegionInfo.EstateSettings.Save(); |
339 | |||
340 | remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
341 | } | 373 | } |
342 | else | 374 | else |
343 | { | 375 | { |
344 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | 376 | remote_client.SendAlertMessage("User is not on the region ban list"); |
345 | } | 377 | } |
346 | break; | 378 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); |
347 | 379 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | |
348 | default: | 380 | } |
381 | else | ||
382 | { | ||
383 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
384 | } | ||
385 | } | ||
386 | if ((estateAccessType & 256) != 0) // Manager add | ||
387 | { | ||
388 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
389 | { | ||
390 | m_scene.RegionInfo.EstateSettings.AddEstateManager(user); | ||
391 | m_scene.RegionInfo.EstateSettings.Save(); | ||
392 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
393 | } | ||
394 | else | ||
395 | { | ||
396 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
397 | } | ||
398 | } | ||
399 | if ((estateAccessType & 512) != 0) // Manager remove | ||
400 | { | ||
401 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
402 | { | ||
403 | m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); | ||
404 | m_scene.RegionInfo.EstateSettings.Save(); | ||
349 | 405 | ||
350 | m_log.ErrorFormat("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta: {0}", estateAccessType.ToString()); | 406 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); |
351 | break; | 407 | } |
408 | else | ||
409 | { | ||
410 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
411 | } | ||
352 | } | 412 | } |
353 | } | 413 | } |
354 | 414 | ||
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 3d7516d..8fa0c65 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -607,7 +607,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
607 | return objectOwnerMask; | 607 | return objectOwnerMask; |
608 | 608 | ||
609 | // Estate users should be able to edit anything in the sim | 609 | // Estate users should be able to edit anything in the sim |
610 | if (IsEstateManager(user) && m_RegionOwnerIsGod && !IsAdministrator(objectOwner)) | 610 | if (IsEstateManager(user) && m_RegionOwnerIsGod && (!IsAdministrator(objectOwner)) || objectOwner == user) |
611 | return objectOwnerMask; | 611 | return objectOwnerMask; |
612 | 612 | ||
613 | // Admin should be able to edit anything in the sim (including admin objects) | 613 | // Admin should be able to edit anything in the sim (including admin objects) |
@@ -899,6 +899,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
899 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 899 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
900 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 900 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
901 | 901 | ||
902 | if (IsEstateManager(user) && m_RegionOwnerIsGod) | ||
903 | return true; | ||
904 | |||
902 | return IsAdministrator(user); | 905 | return IsAdministrator(user); |
903 | } | 906 | } |
904 | 907 | ||