aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/PermissionManager.cs
diff options
context:
space:
mode:
authorMW2008-02-04 12:04:02 +0000
committerMW2008-02-04 12:04:02 +0000
commit755ad9e3e0447b60299b08a18624064d1d64141b (patch)
tree89859180b5ba7ef47defbf6a1d6640177ecb1326 /OpenSim/Region/Environment/PermissionManager.cs
parent* Whole buncha stuff. (diff)
downloadopensim-SC-755ad9e3e0447b60299b08a18624064d1d64141b.zip
opensim-SC-755ad9e3e0447b60299b08a18624064d1d64141b.tar.gz
opensim-SC-755ad9e3e0447b60299b08a18624064d1d64141b.tar.bz2
opensim-SC-755ad9e3e0447b60299b08a18624064d1d64141b.tar.xz
First part of avatar persistence, currently only really works in standalone mode (with accounts_authenticate set to true), it also only currently has a mysql database connector. (sqlite one will follow soon). It also uses the tribalmedia database system, so this needs checking to see if the old problems with mono have been fixed.
To use, see the appearance section in opensim.ini.example, set "persist = true", then add the correct connection string for your database.(see mysql-AvatarAppearance.sql in share folder for a example of the table mysql table structure). This could possible be used in a very small grid, but would mean each region server would need to connect to the same mysql database. But the work to move the code to one of the grid servers shouldn't be too much.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/PermissionManager.cs49
1 files changed, 26 insertions, 23 deletions
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs
index 9640ed7..6c49586 100644
--- a/OpenSim/Region/Environment/PermissionManager.cs
+++ b/OpenSim/Region/Environment/PermissionManager.cs
@@ -170,31 +170,9 @@ namespace OpenSim.Region.Environment
170 // the administrator object permissions to take effect. 170 // the administrator object permissions to take effect.
171 LLUUID objectOwner = task.OwnerID; 171 LLUUID objectOwner = task.OwnerID;
172 172
173 //return task.RootPart.ObjectFlags;task.RootPart.ObjectFlags |
174
175 uint objectOwnerMask = task.RootPart.ObjectFlags; 173 uint objectOwnerMask = task.RootPart.ObjectFlags;
174 objectOwnerMask = ApplyObjectModifyMasks(task.RootPart.OwnerMask, objectOwnerMask);
176 175
177 if((task.RootPart.OwnerMask & (uint)PermissionMask.Copy) != 0)
178 {
179 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectCopy;
180 }
181
182 if ((task.RootPart.OwnerMask & (uint) PermissionMask.Move) != 0)
183 {
184 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectMove;
185 }
186
187 if ((task.RootPart.OwnerMask & (uint) PermissionMask.Modify) != 0)
188 {
189 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectModify;
190 }
191
192 if ((task.RootPart.OwnerMask & (uint) PermissionMask.Transfer) != 0)
193 {
194 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectTransfer;
195 }
196
197 uint objectGroupMask = task.RootPart.ObjectFlags | task.RootPart.GroupMask;
198 uint objectEveryoneMask = task.RootPart.ObjectFlags | task.RootPart.EveryoneMask; 176 uint objectEveryoneMask = task.RootPart.ObjectFlags | task.RootPart.EveryoneMask;
199 177
200 if (m_bypassPermissions) 178 if (m_bypassPermissions)
@@ -240,6 +218,31 @@ namespace OpenSim.Region.Environment
240 return objectEveryoneMask; 218 return objectEveryoneMask;
241 } 219 }
242 220
221
222 private uint ApplyObjectModifyMasks(uint parentMask, uint objectOwnerMask)
223 {
224 if ((parentMask & (uint)PermissionMask.Copy) != 0)
225 {
226 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectCopy;
227 }
228
229 if ((parentMask & (uint)PermissionMask.Move) != 0)
230 {
231 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectMove;
232 }
233
234 if ((parentMask & (uint)PermissionMask.Modify) != 0)
235 {
236 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectModify;
237 }
238
239 if ((parentMask & (uint)PermissionMask.Transfer) != 0)
240 {
241 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectTransfer;
242 }
243 return objectOwnerMask;
244 }
245
243 protected virtual bool GenericObjectPermission(LLUUID currentUser, LLUUID objId) 246 protected virtual bool GenericObjectPermission(LLUUID currentUser, LLUUID objId)
244 { 247 {
245 // Default: deny 248 // Default: deny