diff options
author | Justin Clarke Casey | 2008-05-05 20:14:53 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-05 20:14:53 +0000 |
commit | 9655cf280779021e6241a08f8610cad9b982763f (patch) | |
tree | 82ef6d74969e4b64971d64a6a18e4488729167a8 /OpenSim/Region/Environment/Interfaces/IScenePermissions.cs | |
parent | * Just some tidy up and documentation before I make my first ever attempt to ... (diff) | |
download | opensim-SC_OLD-9655cf280779021e6241a08f8610cad9b982763f.zip opensim-SC_OLD-9655cf280779021e6241a08f8610cad9b982763f.tar.gz opensim-SC_OLD-9655cf280779021e6241a08f8610cad9b982763f.tar.bz2 opensim-SC_OLD-9655cf280779021e6241a08f8610cad9b982763f.tar.xz |
* Refactor: Break out permissions code into a separate region PermissionsModule
Diffstat (limited to 'OpenSim/Region/Environment/Interfaces/IScenePermissions.cs')
-rw-r--r-- | OpenSim/Region/Environment/Interfaces/IScenePermissions.cs | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs b/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs new file mode 100644 index 0000000..ad8e139 --- /dev/null +++ b/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs | |||
@@ -0,0 +1,103 @@ | |||
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 OpenSim 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 libsecondlife; | ||
29 | |||
30 | namespace OpenSim.Region.Environment.Interfaces | ||
31 | { | ||
32 | public interface IScenePermissions | ||
33 | { | ||
34 | bool BypassPermissions { get; set; } | ||
35 | |||
36 | #region Object Permissions | ||
37 | |||
38 | bool CanRezObject(LLUUID user, LLVector3 position); | ||
39 | |||
40 | /// <summary> | ||
41 | /// Permissions check - can user delete an object? | ||
42 | /// </summary> | ||
43 | /// <param name="user">User attempting the delete</param> | ||
44 | /// <param name="obj">Target object</param> | ||
45 | /// <returns>Has permission?</returns> | ||
46 | bool CanDeRezObject(LLUUID user, LLUUID obj); | ||
47 | |||
48 | bool CanCopyObject(LLUUID user, LLUUID obj); | ||
49 | |||
50 | bool CanEditObject(LLUUID user, LLUUID obj); | ||
51 | |||
52 | bool CanEditObjectPosition(LLUUID user, LLUUID obj); | ||
53 | |||
54 | /// <summary> | ||
55 | /// Permissions check - can user enter an object? | ||
56 | /// </summary> | ||
57 | /// <param name="user">User attempting move an object</param> | ||
58 | /// <param name="oldPos">Source object-position</param> | ||
59 | /// <param name="newPos">Target object-position</param> | ||
60 | /// <returns>Has permission?</returns> | ||
61 | bool CanObjectEntry(LLUUID user, LLVector3 oldPos, LLVector3 newPos); | ||
62 | |||
63 | bool CanReturnObject(LLUUID user, LLUUID obj); | ||
64 | |||
65 | #endregion | ||
66 | |||
67 | #region Uncategorized permissions | ||
68 | |||
69 | bool CanInstantMessage(LLUUID user, LLUUID target); | ||
70 | |||
71 | bool CanInventoryTransfer(LLUUID user, LLUUID target); | ||
72 | |||
73 | bool CanEditScript(LLUUID user, LLUUID script); | ||
74 | |||
75 | bool CanRunScript(LLUUID user, LLUUID script); | ||
76 | |||
77 | bool CanRunConsoleCommand(LLUUID user); | ||
78 | |||
79 | bool CanTerraform(LLUUID user, LLVector3 position); | ||
80 | |||
81 | #endregion | ||
82 | |||
83 | #region Estate Permissions | ||
84 | |||
85 | bool IsEstateManager(LLUUID user); | ||
86 | |||
87 | bool GenericEstatePermission(LLUUID user); | ||
88 | |||
89 | bool CanEditEstateTerrain(LLUUID user); | ||
90 | |||
91 | bool CanRestartSim(LLUUID user); | ||
92 | |||
93 | bool CanEditParcel(LLUUID user, ILandObject parcel); | ||
94 | |||
95 | bool CanSellParcel(LLUUID user, ILandObject parcel); | ||
96 | |||
97 | bool CanAbandonParcel(LLUUID user, ILandObject parcel); | ||
98 | |||
99 | #endregion | ||
100 | |||
101 | uint GenerateClientFlags(LLUUID user, LLUUID objID); | ||
102 | } | ||
103 | } | ||