diff options
author | Justin Clark-Casey (justincc) | 2011-07-23 02:05:51 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-07-23 02:05:51 +0100 |
commit | fcaa4f601231a6feb7fd5ea40e35fba6220c6235 (patch) | |
tree | 003517e08cd61bccc1263ab992d09c576aa25ab4 /OpenSim/Services | |
parent | Don't load current/next/everyone/base permissions from the library item xml f... (diff) | |
download | opensim-SC_OLD-fcaa4f601231a6feb7fd5ea40e35fba6220c6235.zip opensim-SC_OLD-fcaa4f601231a6feb7fd5ea40e35fba6220c6235.tar.gz opensim-SC_OLD-fcaa4f601231a6feb7fd5ea40e35fba6220c6235.tar.bz2 opensim-SC_OLD-fcaa4f601231a6feb7fd5ea40e35fba6220c6235.tar.xz |
Revert "Don't load current/next/everyone/base permissions from the library item xml files - always use PermissionMask.All instead (which was the existing default)."
There actually are uses for this. I will correct the perms instead since some entries appear to be wrong.
This reverts commit 667b54f5a2a04fa5a2859397868d270eab3913f1.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/InventoryService/LibraryService.cs | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/OpenSim/Services/InventoryService/LibraryService.cs b/OpenSim/Services/InventoryService/LibraryService.cs index b46add3..383f311 100644 --- a/OpenSim/Services/InventoryService/LibraryService.cs +++ b/OpenSim/Services/InventoryService/LibraryService.cs | |||
@@ -93,6 +93,26 @@ namespace OpenSim.Services.InventoryService | |||
93 | LoadLibraries(pLibrariesLocation); | 93 | LoadLibraries(pLibrariesLocation); |
94 | } | 94 | } |
95 | 95 | ||
96 | public InventoryItemBase CreateItem(UUID inventoryID, UUID assetID, string name, string description, | ||
97 | int assetType, int invType, UUID parentFolderID) | ||
98 | { | ||
99 | InventoryItemBase item = new InventoryItemBase(); | ||
100 | item.Owner = libOwner; | ||
101 | item.CreatorId = libOwner.ToString(); | ||
102 | item.ID = inventoryID; | ||
103 | item.AssetID = assetID; | ||
104 | item.Description = description; | ||
105 | item.Name = name; | ||
106 | item.AssetType = assetType; | ||
107 | item.InvType = invType; | ||
108 | item.Folder = parentFolderID; | ||
109 | item.BasePermissions = 0x7FFFFFFF; | ||
110 | item.EveryOnePermissions = 0x7FFFFFFF; | ||
111 | item.CurrentPermissions = 0x7FFFFFFF; | ||
112 | item.NextPermissions = 0x7FFFFFFF; | ||
113 | return item; | ||
114 | } | ||
115 | |||
96 | /// <summary> | 116 | /// <summary> |
97 | /// Use the asset set information at path to load assets | 117 | /// Use the asset set information at path to load assets |
98 | /// </summary> | 118 | /// </summary> |
@@ -173,27 +193,22 @@ namespace OpenSim.Services.InventoryService | |||
173 | item.Description = config.GetString("description", item.Name); | 193 | item.Description = config.GetString("description", item.Name); |
174 | item.InvType = config.GetInt("inventoryType", 0); | 194 | item.InvType = config.GetInt("inventoryType", 0); |
175 | item.AssetType = config.GetInt("assetType", item.InvType); | 195 | item.AssetType = config.GetInt("assetType", item.InvType); |
176 | item.CurrentPermissions = (uint)PermissionMask.All; | 196 | item.CurrentPermissions = (uint)config.GetLong("currentPermissions", 0x7FFFFFFF); |
177 | item.NextPermissions = (uint)PermissionMask.All; | 197 | item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF); |
178 | item.EveryOnePermissions = (uint)PermissionMask.All; | 198 | item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF); |
179 | // item.EveryOnePermissions = (uint)PermissionMask.All - (uint)PermissionMask.Modify; | 199 | item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF); |
180 | item.BasePermissions = (uint)PermissionMask.All; | 200 | item.Flags = (uint)config.GetInt("flags", 0); |
181 | 201 | ||
182 | if (libraryFolders.ContainsKey(item.Folder)) | 202 | if (libraryFolders.ContainsKey(item.Folder)) |
183 | { | 203 | { |
184 | InventoryFolderImpl parentFolder = libraryFolders[item.Folder]; | 204 | InventoryFolderImpl parentFolder = libraryFolders[item.Folder]; |
185 | |||
186 | try | 205 | try |
187 | { | 206 | { |
188 | // m_log.DebugFormat( | ||
189 | // "[LIBRARY INVENTORY]: Adding item {0} {1}, OwnerPermissions {2:X} to {3}", | ||
190 | // item.Name, item.ID, item.CurrentPermissions, item.Folder); | ||
191 | |||
192 | parentFolder.Items.Add(item.ID, item); | 207 | parentFolder.Items.Add(item.ID, item); |
193 | } | 208 | } |
194 | catch (Exception) | 209 | catch (Exception) |
195 | { | 210 | { |
196 | m_log.WarnFormat("[LIBRARY INVENTORY]: Item {1} [{0}] not added, duplicate item", item.ID, item.Name); | 211 | m_log.WarnFormat("[LIBRARY INVENTORY] Item {1} [{0}] not added, duplicate item", item.ID, item.Name); |
197 | } | 212 | } |
198 | } | 213 | } |
199 | else | 214 | else |