MCPcopy Create free account
hub / github.com/documentdb/documentdb / GetInternalRoleName

Function GetInternalRoleName

pg_documentdb/src/commands/roles.c:1801–1822  ·  view source on GitHub ↗

* GetInternalRoleName maps native role names to internal role names. */

Source from the content-addressed store, hash-verified

1799 * GetInternalRoleName maps native role names to internal role names.
1800 */
1801static const char *
1802GetInternalRoleName(const char *nativeRoleName)
1803{
1804 if (strcmp(nativeRoleName, "clusterAdmin") == 0)
1805 {
1806 return ApiClusterAdminRole;
1807 }
1808 else if (strcmp(nativeRoleName, "readAnyDatabase") == 0)
1809 {
1810 return ApiReadOnlyRole;
1811 }
1812 else if (strcmp(nativeRoleName, "readWriteAnyDatabase") == 0)
1813 {
1814 return ApiReadWriteRole;
1815 }
1816 else if (strcmp(nativeRoleName, "root") == 0)
1817 {
1818 return ApiRootInternalRole;
1819 }
1820
1821 return nativeRoleName;
1822}
1823
1824
1825/*

Calls

no outgoing calls

Tested by

no test coverage detected