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

Function ConsolidatePrivileges

pg_documentdb/src/utils/role_utils.c:481–495  ·  view source on GitHub ↗

* Takes a list of source privileges and consolidates them into the * provided list of consolidated privileges, merging any duplicate privileges and combining their actions. */

Source from the content-addressed store, hash-verified

479 * provided list of consolidated privileges, merging any duplicate privileges and combining their actions.
480 */
481static void
482ConsolidatePrivileges(List **consolidatedPrivileges,
483 const Privilege *sourcePrivileges,
484 size_t sourcePrivilegeCount)
485{
486 if (sourcePrivileges == NULL)
487 {
488 return;
489 }
490
491 for (size_t i = 0; i < sourcePrivilegeCount; i++)
492 {
493 ConsolidatePrivilege(consolidatedPrivileges, &sourcePrivileges[i]);
494 }
495}
496
497
498/*

Callers 1

Calls 1

ConsolidatePrivilegeFunction · 0.85

Tested by

no test coverage detected