[mapguide-commits] r9945 - in sandbox/jng/vanilla_swig: Common/PlatformBase/Services Server/src/Common/Manager Server/src/Services/Feature Server/src/Services/Resource Server/src/Services/Tile
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Jun 6 04:36:26 PDT 2022
Author: jng
Date: 2022-06-06 04:36:25 -0700 (Mon, 06 Jun 2022)
New Revision: 9945
Modified:
sandbox/jng/vanilla_swig/Common/PlatformBase/Services/ResourceDefs.cpp
sandbox/jng/vanilla_swig/Common/PlatformBase/Services/ResourceDefs.h
sandbox/jng/vanilla_swig/Server/src/Common/Manager/CacheManager.cpp
sandbox/jng/vanilla_swig/Server/src/Common/Manager/PermissionInfo.cpp
sandbox/jng/vanilla_swig/Server/src/Services/Feature/ServerDescribeSchema.cpp
sandbox/jng/vanilla_swig/Server/src/Services/Feature/ServerGetSpatialContexts.cpp
sandbox/jng/vanilla_swig/Server/src/Services/Resource/ApplicationRepositoryManager.cpp
sandbox/jng/vanilla_swig/Server/src/Services/Resource/ApplicationResourceContentManager.cpp
sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceContentManager.cpp
sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceContentManager.h
sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceDefinitionManager.cpp
sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceDefinitionManager.h
sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceHeaderManager.cpp
sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceHeaderManager.h
sandbox/jng/vanilla_swig/Server/src/Services/Resource/SiteResourceContentManager.cpp
sandbox/jng/vanilla_swig/Server/src/Services/Tile/ServerTileService.cpp
sandbox/jng/vanilla_swig/Server/src/Services/Tile/TileCacheDefault.cpp
Log:
Current vanilla SWIG has issues with MgResourcePermission::ReadOnly for PHP because "readonly" is now a reserved keyword in PHP. To avoid this problem, all members of MgResourcePermission are now prefixed with "Permission"
Modified: sandbox/jng/vanilla_swig/Common/PlatformBase/Services/ResourceDefs.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Common/PlatformBase/Services/ResourceDefs.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Common/PlatformBase/Services/ResourceDefs.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -105,9 +105,9 @@
///////////////////////////////////////////////////////////////////////////////
/// Types of resource permissions
///
-const STRING MgResourcePermission::NoAccess = L"n";
-const STRING MgResourcePermission::ReadOnly = L"r";
-const STRING MgResourcePermission::ReadWrite = L"r,w";
+const STRING MgResourcePermission::PermissionNoAccess = L"n";
+const STRING MgResourcePermission::PermissionReadOnly = L"r";
+const STRING MgResourcePermission::PermissionReadWrite = L"r,w";
///////////////////////////////////////////////////////////////////////////////
Modified: sandbox/jng/vanilla_swig/Common/PlatformBase/Services/ResourceDefs.h
===================================================================
--- sandbox/jng/vanilla_swig/Common/PlatformBase/Services/ResourceDefs.h 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Common/PlatformBase/Services/ResourceDefs.h 2022-06-06 11:36:25 UTC (rev 9945)
@@ -570,15 +570,15 @@
/// \brief
/// No Access permission.
- static const STRING NoAccess; ///\if INTERNAL value("n") \endif
+ static const STRING PermissionNoAccess; ///\if INTERNAL value("n") \endif
/// \brief
/// Read-Only permission.
- static const STRING ReadOnly; ///\if INTERNAL value("r") \endif
+ static const STRING PermissionReadOnly; ///\if INTERNAL value("r") \endif
/// \brief
/// Read/Write permission.
- static const STRING ReadWrite; ///\if INTERNAL value("r,w") \endif
+ static const STRING PermissionReadWrite; ///\if INTERNAL value("r,w") \endif
};
Modified: sandbox/jng/vanilla_swig/Server/src/Common/Manager/CacheManager.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Common/Manager/CacheManager.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Common/Manager/CacheManager.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -287,7 +287,7 @@
}
else
{
- CheckPermission(resource, MgResourcePermission::ReadOnly);
+ CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
MG_CATCH_AND_THROW(L"MgCacheManager.GetFeatureSourceCacheItem")
@@ -344,7 +344,7 @@
}
else
{
- CheckPermission(resource, MgResourcePermission::ReadOnly);
+ CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
MG_CATCH_AND_THROW(L"MgCacheManager.GetSpatialContextCacheItem")
@@ -434,7 +434,7 @@
}
else
{
- CheckPermission(resource, MgResourcePermission::ReadOnly);
+ CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
MG_CATCH_AND_THROW(L"MgCacheManager.GetResourceLayerDefinitionCacheItem")
Modified: sandbox/jng/vanilla_swig/Server/src/Common/Manager/PermissionInfo.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Common/Manager/PermissionInfo.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Common/Manager/PermissionInfo.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -218,15 +218,15 @@
{
CREFSTRING grantedPermission = (*i).second;
- if (MgResourcePermission::NoAccess != grantedPermission)
+ if (MgResourcePermission::PermissionNoAccess != grantedPermission)
{
if (permission == grantedPermission)
{
status = MgPermissionInfo::Permitted;
}
- else if (MgResourcePermission::ReadWrite == grantedPermission)
+ else if (MgResourcePermission::PermissionReadWrite == grantedPermission)
{
- if (MgResourcePermission::ReadOnly == permission)
+ if (MgResourcePermission::PermissionReadOnly == permission)
{
status = MgPermissionInfo::Permitted;
}
@@ -257,15 +257,15 @@
{
CREFSTRING grantedPermission = (*i).second;
- if (MgResourcePermission::NoAccess != grantedPermission)
+ if (MgResourcePermission::PermissionNoAccess != grantedPermission)
{
if (permission == grantedPermission)
{
status = MgPermissionInfo::Permitted;
}
- else if (MgResourcePermission::ReadWrite == grantedPermission)
+ else if (MgResourcePermission::PermissionReadWrite == grantedPermission)
{
- if (MgResourcePermission::ReadOnly == permission)
+ if (MgResourcePermission::PermissionReadOnly == permission)
{
status = MgPermissionInfo::Permitted;
}
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Feature/ServerDescribeSchema.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Feature/ServerDescribeSchema.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Feature/ServerDescribeSchema.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -577,7 +577,7 @@
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgServerDescribeSchema.DescribeSchema")
@@ -626,7 +626,7 @@
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
// Get the schema XML.
@@ -636,12 +636,12 @@
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
MG_FEATURE_SERVICE_CATCH_AND_THROW_WITH_FEATURE_SOURCE(L"MgServerDescribeSchema.DescribeSchemaAsXml", resource)
@@ -856,7 +856,7 @@
{
if (connection->SupportsCommand((INT32)FdoCommandType_GetSchemaNames))
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
// The reference to the FDO connection from the MgServerFeatureConnection object must be cleaned up
// before the parent object, otherwise it leaves the FDO connection marked as still in use.
@@ -888,7 +888,7 @@
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
// Get the schema names.
@@ -905,7 +905,7 @@
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgServerDescribeSchema.GetSchemas")
@@ -969,7 +969,7 @@
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
// Get the class names.
@@ -977,7 +977,7 @@
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
// The reference to the FDO connection from the MgServerFeatureConnection object must be cleaned up
// before the parent object, otherwise it leaves the FDO connection marked as still in use.
@@ -1008,7 +1008,7 @@
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgServerDescribeSchema.GetClasses")
@@ -1066,7 +1066,7 @@
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
}
MG_FEATURE_SERVICE_CATCH_AND_THROW_WITH_FEATURE_SOURCE(L"MgServerDescribeSchema.GetClassDefinition", resource)
@@ -1162,7 +1162,7 @@
}
else
{
- m_cacheManager->CheckPermission(resource, MgResourcePermission::ReadOnly);
+ m_cacheManager->CheckPermission(resource, MgResourcePermission::PermissionReadOnly);
fdoSchemas = MgServerFeatureUtil::GetFdoFeatureSchemaCollection(mgSchemas.p);
}
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Feature/ServerGetSpatialContexts.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Feature/ServerGetSpatialContexts.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Feature/ServerGetSpatialContexts.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -94,7 +94,7 @@
}
else
{
- MgCacheManager::GetInstance()->CheckPermission(resId, MgResourcePermission::ReadOnly);
+ MgCacheManager::GetInstance()->CheckPermission(resId, MgResourcePermission::PermissionReadOnly);
}
MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resId, L"MgServerGetSpatialContexts.GetSpatialContexts")
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Resource/ApplicationRepositoryManager.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Resource/ApplicationRepositoryManager.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Resource/ApplicationRepositoryManager.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -486,7 +486,7 @@
if(cascade)
{
MgApplicationResourceContentManager* resourceContentMan = GetApplicationResourceContentManager();
- referencingIds = resourceContentMan->EnumerateAllReferences(sourceResource, MgResourcePermission::ReadWrite);
+ referencingIds = resourceContentMan->EnumerateAllReferences(sourceResource, MgResourcePermission::PermissionReadWrite);
}
// Move the resource and all of its children.
@@ -870,7 +870,7 @@
GetApplicationResourceContentManager();
STRING resourceTags;
XmlDocument xmlDoc = resourceContentMan->GetResourceTags(resource,
- MgResourcePermission::ReadWrite, resourceTags);
+ MgResourcePermission::PermissionReadWrite, resourceTags);
// Set the resource data.
@@ -1006,7 +1006,7 @@
GetApplicationResourceContentManager();
STRING resourceTags;
XmlDocument xmlDoc = resourceContentMan->GetResourceTags(resource,
- MgResourcePermission::ReadWrite, resourceTags);
+ MgResourcePermission::PermissionReadWrite, resourceTags);
// Delete the resource tag.
@@ -1102,7 +1102,7 @@
GetApplicationResourceContentManager();
STRING resourceTags;
XmlDocument xmlDoc = resourceContentMan->GetResourceTags(resource,
- MgResourcePermission::ReadWrite, resourceTags);
+ MgResourcePermission::PermissionReadWrite, resourceTags);
MgTagManager tagMan(resourceTags);
MgTagInfo tagInfo;
@@ -1185,7 +1185,7 @@
STRING resourceTags;
resourceContentMan->GetResourceTags(resource,
- MgResourcePermission::ReadOnly, resourceTags);
+ MgResourcePermission::PermissionReadOnly, resourceTags);
MgTagManager tagMan(resourceTags);
MgTagInfo tagInfo;
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Resource/ApplicationResourceContentManager.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Resource/ApplicationResourceContentManager.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Resource/ApplicationResourceContentManager.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -101,7 +101,7 @@
currResource.SetResource(MgUtil::MultiByteToWideChar(xmlDoc.getName()));
if (CheckPermission(currResource,
- MgResourcePermission::ReadOnly, false))
+ MgResourcePermission::PermissionReadOnly, false))
{
list += "\t<ResourceId>";
list += xmlDoc.getName();
@@ -386,7 +386,7 @@
// Get the resource tags.
STRING resourceTags;
- GetResourceTags(resource, MgResourcePermission::ReadOnly, resourceTags);
+ GetResourceTags(resource, MgResourcePermission::PermissionReadOnly, resourceTags);
MgTagManager tagMan(resourceTags);
MgTagMap& tagMap = tagMan.GetTagMap();
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceContentManager.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceContentManager.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceContentManager.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -267,7 +267,7 @@
string currPathname = currDoc.getName();
MgResourceIdentifier currResource(MgUtil::MultiByteToWideChar(currPathname));
- CheckParentPermission(currResource, MgResourcePermission::ReadWrite);
+ CheckParentPermission(currResource, MgResourcePermission::PermissionReadWrite);
if (sourceResourceIsFolder)
{
@@ -412,7 +412,7 @@
string currPathname = currDoc.getName();
MgResourceIdentifier currResource(MgUtil::MultiByteToWideChar(currPathname));
- sourceResourceContentMan->CheckPermission(currResource, MgResourcePermission::ReadOnly);
+ sourceResourceContentMan->CheckPermission(currResource, MgResourcePermission::PermissionReadOnly);
if (sourceResourceIsFolder)
{
@@ -606,7 +606,7 @@
// Check if the current user is allowed to perform the current operation.
- CheckParentPermission(resource, MgResourcePermission::ReadWrite);
+ CheckParentPermission(resource, MgResourcePermission::PermissionReadWrite);
// Notify the applicable caches of the changed resource.
@@ -649,7 +649,7 @@
// Check if the current user is allowed to perform the current operation.
- CheckPermission(resource, MgResourcePermission::ReadWrite);
+ CheckPermission(resource, MgResourcePermission::PermissionReadWrite);
// Notify the applicable caches of the changed resource.
@@ -681,7 +681,7 @@
// Check if the current user is allowed to perform the current operation.
- CheckParentPermission(resource, MgResourcePermission::ReadWrite);
+ CheckParentPermission(resource, MgResourcePermission::PermissionReadWrite);
// Delete the resource data.
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceContentManager.h
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceContentManager.h 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceContentManager.h 2022-06-06 11:36:25 UTC (rev 9945)
@@ -63,7 +63,7 @@
CREFSTRING rootName, CREFSTRING schemaName);
virtual XmlDocument GetDocument(MgResourceIdentifier& resource,
- CREFSTRING permission = MgResourcePermission::ReadOnly);
+ CREFSTRING permission = MgResourcePermission::PermissionReadOnly);
virtual void PutDocument(MgResourceIdentifier& resource,
XmlDocument& xmlDoc, XmlUpdateContext& updateContext);
virtual void TransformDocument(const string& xmlStr,
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceDefinitionManager.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceDefinitionManager.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceDefinitionManager.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -245,7 +245,7 @@
// Get the document.
MgResourceIdentifier& resource = resourceInfo.GetIdentifier();
- XmlDocument xmlDoc = GetDocument(resource, MgResourcePermission::ReadWrite);
+ XmlDocument xmlDoc = GetDocument(resource, MgResourcePermission::PermissionReadWrite);
// Convert an XML string into an XML document.
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceDefinitionManager.h
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceDefinitionManager.h 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceDefinitionManager.h 2022-06-06 11:36:25 UTC (rev 9945)
@@ -91,7 +91,7 @@
CREFSTRING rootName, CREFSTRING schemaName) = 0;
virtual XmlDocument GetDocument(MgResourceIdentifier& resource,
- CREFSTRING permission = MgResourcePermission::ReadOnly) = 0;
+ CREFSTRING permission = MgResourcePermission::PermissionReadOnly) = 0;
virtual void PutDocument(MgResourceIdentifier& resource,
XmlDocument& xmlDoc, XmlUpdateContext& updateContext) = 0;
virtual void TransformDocument(const string& xmlStr,
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceHeaderManager.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceHeaderManager.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceHeaderManager.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -282,7 +282,7 @@
if (!m_repositoryMan.m_currUserIsAdmin)
{
if (!CheckParentPermission(currResource,
- MgResourcePermission::ReadOnly, false))
+ MgResourcePermission::PermissionReadOnly, false))
{
continue;
}
@@ -401,7 +401,7 @@
// Check if the current user has read access to the current resource.
- CheckParentPermission(*resource, MgResourcePermission::ReadOnly);
+ CheckParentPermission(*resource, MgResourcePermission::PermissionReadOnly);
// Filter resources based on modified date.
@@ -717,7 +717,7 @@
string currPathname = currDoc.getName();
MgResourceIdentifier currResource(MgUtil::MultiByteToWideChar(currPathname));
- CheckParentPermission(currResource, MgResourcePermission::ReadWrite);
+ CheckParentPermission(currResource, MgResourcePermission::PermissionReadWrite);
if (sourceResourceIsFolder)
{
@@ -882,7 +882,7 @@
string currPathname = currDoc.getName();
MgResourceIdentifier currResource(MgUtil::MultiByteToWideChar(currPathname));
- sourceResourceHeaderMan->CheckPermission(currResource, MgResourcePermission::ReadOnly);
+ sourceResourceHeaderMan->CheckPermission(currResource, MgResourcePermission::PermissionReadOnly);
if (sourceResourceIsFolder)
{
@@ -1082,7 +1082,7 @@
if (!m_repositoryMan.m_currUserIsAdmin
&& !CheckParentPermission(
- currResource, MgResourcePermission::ReadOnly, false))
+ currResource, MgResourcePermission::PermissionReadOnly, false))
{
continue;
}
@@ -1519,7 +1519,7 @@
{
permissionInfo->SetInherited(false);
permissionInfo->SetGroupPermission(
- MgGroup::Everyone, MgResourcePermission::ReadWrite);
+ MgGroup::Everyone, MgResourcePermission::PermissionReadWrite);
}
else // Sub-folder or document
{
@@ -1892,7 +1892,7 @@
}
if (m_accessibleResources[resource].empty() ||
- MgResourcePermission::ReadWrite == permission)
+ MgResourcePermission::PermissionReadWrite == permission)
{
m_accessibleResources[resource] = permission;
}
@@ -1925,7 +1925,7 @@
}
if (m_inaccessibleResources[resource].empty() ||
- MgResourcePermission::ReadOnly == permission)
+ MgResourcePermission::PermissionReadOnly == permission)
{
m_inaccessibleResources[resource] = permission;
}
@@ -2439,7 +2439,7 @@
// Only allow the author to have write access.
- if (MgResourcePermission::ReadWrite == permission
+ if (MgResourcePermission::PermissionReadWrite == permission
&& !m_repositoryMan.m_currUserIsAuthor)
{
if (strict)
@@ -2739,7 +2739,7 @@
// Check if the current user is allowed to perform the current operation.
- CheckParentPermission(resource, MgResourcePermission::ReadWrite);
+ CheckParentPermission(resource, MgResourcePermission::PermissionReadWrite);
// Insert the resource.
@@ -2748,7 +2748,7 @@
// Update the local permission cache.
UpdatePermissionCache(MgResourceService::opIdSetResource,
- resource.ToString(), MgResourcePermission::ReadWrite, xmlDoc, true);
+ resource.ToString(), MgResourcePermission::PermissionReadWrite, xmlDoc, true);
MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgResourceHeaderManager.PutDocument")
}
@@ -2833,11 +2833,11 @@
if (MgResourceService::opIdMoveResource == opId)
{
- CheckParentPermission(resource, MgResourcePermission::ReadWrite);
+ CheckParentPermission(resource, MgResourcePermission::PermissionReadWrite);
}
else
{
- CheckPermission(resource, MgResourcePermission::ReadWrite);
+ CheckPermission(resource, MgResourcePermission::PermissionReadWrite);
}
// Update the resource.
@@ -2847,7 +2847,7 @@
// Update the local permission cache.
UpdatePermissionCache(opId, resource.ToString(),
- MgResourcePermission::ReadWrite, xmlDoc, true);
+ MgResourcePermission::PermissionReadWrite, xmlDoc, true);
MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgResourceHeaderManager.UpdateDocument")
}
@@ -2871,12 +2871,12 @@
// Check if the current user is allowed to perform the current operation.
- CheckParentPermission(resource, MgResourcePermission::ReadWrite);
+ CheckParentPermission(resource, MgResourcePermission::PermissionReadWrite);
// Update the local permission cache.
UpdatePermissionCache(MgResourceService::opIdDeleteResource,
- resource.ToString(), MgResourcePermission::ReadWrite, xmlDoc, false);
+ resource.ToString(), MgResourcePermission::PermissionReadWrite, xmlDoc, false);
// Delete the resource.
@@ -3029,7 +3029,7 @@
// Check if the current user has a read permission.
if (CheckPermission(currResource,
- MgResourcePermission::ReadOnly, false))
+ MgResourcePermission::PermissionReadOnly, false))
{
// Package the resource header.
packageMaker.PackageResourceHeader(currResource, xmlDoc);
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceHeaderManager.h
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceHeaderManager.h 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Resource/ResourceHeaderManager.h 2022-06-06 11:36:25 UTC (rev 9945)
@@ -92,7 +92,7 @@
CREFSTRING rootName, CREFSTRING schemaName);
virtual XmlDocument GetDocument(MgResourceIdentifier& resource,
- CREFSTRING permission = MgResourcePermission::ReadOnly);
+ CREFSTRING permission = MgResourcePermission::PermissionReadOnly);
virtual void PutDocument(MgResourceIdentifier& resource,
XmlDocument& xmlDoc, XmlUpdateContext& updateContext);
virtual void TransformDocument(const string& xmlStr,
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Resource/SiteResourceContentManager.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Resource/SiteResourceContentManager.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Resource/SiteResourceContentManager.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -1196,7 +1196,7 @@
__LINE__, __WFILE__, NULL, L"", NULL);
}
- XmlDocument groupDoc = this->GetDocument(groupRes, MgResourcePermission::ReadWrite);
+ XmlDocument groupDoc = this->GetDocument(groupRes, MgResourcePermission::PermissionReadWrite);
string xmlContent;
MgXmlUtil xmlUtil(groupDoc.getContent(xmlContent));
DOMDocument* groupDOM = xmlUtil.GetDocument();
@@ -1586,7 +1586,7 @@
__LINE__, __WFILE__, NULL, L"", NULL);
}
- XmlDocument roleDoc = this->GetDocument(roleRes, MgResourcePermission::ReadWrite);
+ XmlDocument roleDoc = this->GetDocument(roleRes, MgResourcePermission::PermissionReadWrite);
string xmlContent;
MgXmlUtil xmlUtil(roleDoc.getContent(xmlContent));
DOMDocument* roleDOM = xmlUtil.GetDocument();
@@ -1818,7 +1818,7 @@
__LINE__, __WFILE__, NULL, L"", NULL);
}
- XmlDocument roleDoc = this->GetDocument(roleRes, MgResourcePermission::ReadWrite);
+ XmlDocument roleDoc = this->GetDocument(roleRes, MgResourcePermission::PermissionReadWrite);
string xmlContent;
MgXmlUtil xmlUtil(roleDoc.getContent(xmlContent));
DOMDocument* roleDOM = xmlUtil.GetDocument();
@@ -2019,7 +2019,7 @@
// Get the group document.
- XmlDocument xmlDoc = GetDocument(*groupRes, MgResourcePermission::ReadWrite);
+ XmlDocument xmlDoc = GetDocument(*groupRes, MgResourcePermission::PermissionReadWrite);
XmlValue docValue(xmlDoc);
// Set up an XQuery.
@@ -2133,7 +2133,7 @@
// Get the role document.
- XmlDocument xmlDoc = GetDocument(*roleRes, MgResourcePermission::ReadWrite);
+ XmlDocument xmlDoc = GetDocument(*roleRes, MgResourcePermission::PermissionReadWrite);
XmlValue docValue(xmlDoc);
// Set up an XQuery.
@@ -2247,7 +2247,7 @@
// Get the role document.
- XmlDocument xmlDoc = GetDocument(*roleRes, MgResourcePermission::ReadWrite);
+ XmlDocument xmlDoc = GetDocument(*roleRes, MgResourcePermission::PermissionReadWrite);
XmlValue docValue(xmlDoc);
// Set up an XQuery.
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Tile/ServerTileService.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Tile/ServerTileService.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Tile/ServerTileService.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -483,7 +483,7 @@
serviceMan->RequestService(MgServiceType::ResourceService));
assert(NULL != resourceService);
- if (!resourceService->HasPermission(resource, MgResourcePermission::ReadOnly))
+ if (!resourceService->HasPermission(resource, MgResourcePermission::PermissionReadOnly))
{
MG_LOG_AUTHENTICATION_ENTRY(MgResources::PermissionDenied.c_str());
Modified: sandbox/jng/vanilla_swig/Server/src/Services/Tile/TileCacheDefault.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Server/src/Services/Tile/TileCacheDefault.cpp 2022-05-31 14:48:50 UTC (rev 9944)
+++ sandbox/jng/vanilla_swig/Server/src/Services/Tile/TileCacheDefault.cpp 2022-06-06 11:36:25 UTC (rev 9945)
@@ -544,7 +544,7 @@
serviceMan->RequestService(MgServiceType::ResourceService));
assert(NULL != resourceService);
- if (!resourceService->HasPermission(mapDefinition, MgResourcePermission::ReadOnly))
+ if (!resourceService->HasPermission(mapDefinition, MgResourcePermission::PermissionReadOnly))
{
MG_LOG_AUTHENTICATION_ENTRY(MgResources::PermissionDenied.c_str());
More information about the mapguide-commits
mailing list