aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService/HGAssetService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/HypergridService/HGAssetService.cs')
-rw-r--r--OpenSim/Services/HypergridService/HGAssetService.cs26
1 files changed, 3 insertions, 23 deletions
diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs
index 84dec8d..db98166 100644
--- a/OpenSim/Services/HypergridService/HGAssetService.cs
+++ b/OpenSim/Services/HypergridService/HGAssetService.cs
@@ -58,8 +58,6 @@ namespace OpenSim.Services.HypergridService
58 58
59 private UserAccountCache m_Cache; 59 private UserAccountCache m_Cache;
60 60
61 private AssetPermissions m_AssetPerms;
62
63 public HGAssetService(IConfigSource config, string configName) : base(config, configName) 61 public HGAssetService(IConfigSource config, string configName) : base(config, configName)
64 { 62 {
65 m_log.Debug("[HGAsset Service]: Starting"); 63 m_log.Debug("[HGAsset Service]: Starting");
@@ -82,10 +80,6 @@ namespace OpenSim.Services.HypergridService
82 m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL); 80 m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL);
83 81
84 m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService); 82 m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
85
86 // Permissions
87 m_AssetPerms = new AssetPermissions(assetConfig);
88
89 } 83 }
90 84
91 #region IAssetService overrides 85 #region IAssetService overrides
@@ -96,9 +90,6 @@ namespace OpenSim.Services.HypergridService
96 if (asset == null) 90 if (asset == null)
97 return null; 91 return null;
98 92
99 if (!m_AssetPerms.AllowedExport(asset.Type))
100 return null;
101
102 if (asset.Metadata.Type == (sbyte)AssetType.Object) 93 if (asset.Metadata.Type == (sbyte)AssetType.Object)
103 asset.Data = AdjustIdentifiers(asset.Data); ; 94 asset.Data = AdjustIdentifiers(asset.Data); ;
104 95
@@ -121,27 +112,16 @@ namespace OpenSim.Services.HypergridService
121 112
122 public override byte[] GetData(string id) 113 public override byte[] GetData(string id)
123 { 114 {
124 AssetBase asset = Get(id); 115 byte[] data = base.GetData(id);
125
126 if (asset == null)
127 return null;
128 116
129 if (!m_AssetPerms.AllowedExport(asset.Type)) 117 if (data == null)
130 return null; 118 return null;
131 119
132 return asset.Data; 120 return AdjustIdentifiers(data);
133 } 121 }
134 122
135 //public virtual bool Get(string id, Object sender, AssetRetrieved handler) 123 //public virtual bool Get(string id, Object sender, AssetRetrieved handler)
136 124
137 public override string Store(AssetBase asset)
138 {
139 if (!m_AssetPerms.AllowedImport(asset.Type))
140 return string.Empty;
141
142 return base.Store(asset);
143 }
144
145 public override bool Delete(string id) 125 public override bool Delete(string id)
146 { 126 {
147 // NOGO 127 // NOGO