* GetInternalRoleName maps native role names to internal role names. */
| 1799 | * GetInternalRoleName maps native role names to internal role names. |
| 1800 | */ |
| 1801 | static const char * |
| 1802 | GetInternalRoleName(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 | /* |
no outgoing calls
no test coverage detected