Export (0) Print
Expand All
Expand Minimize

5.101 IsGetNCChangesPermissionGranted

procedure IsGetNCChangesPermissionGranted(
    msgIn: DRS_MSG_GETCHGREQ_V10) : boolean

Informative summary of behavior: The IsGetNCChangesPermissionGranted procedure returns true if the source DC has permission to replicate objects and its attributes from the NC replica, as defined in msgIn.

ncRoot: DSName
clientDsaObj: DSName
serverObj: DSName
cachedAt: DSName
cachedUser: DSName
fRevealSecret: boolean
fRevealFilteredSet: boolean

ncRoot := GetObjectNC(msgIn.pNC^)
if not AccessCheckCAR(ncRoot, Ds-Replication-Get-Changes) then
  return false
endif

fRevealSecret := true

if IsRevealSecretRequest(msgIn) then
  if AccessCheckCAR(ncRoot, Ds-Replication-Get-Changes-All) = false
    then 
    if (msgIn.ulExtendedOp = EXOP_REPL_SECRETS) then
      clientDsaObj := select one o from ConfigNC()where
                        o!objectGUID = msgIn.uuidDsaObjDest
      serverObj := clientDsaObj!parent
      cachedAt := serverObj!serverReference
      cachedUser := msgIn.pNC^
      fRevealSecret := RevealSecretsForUserAllowed(
                         cachedAt, cachedUser)
    else
      fRevealSecret := false
    endif
  endif
endif

fRevealFilteredSet := true
if IsRevealFilteredAttr(msgIn) then
  if (AccessCheckCAR(ncRoot, Ds-Replication-Get-Changes-All) = false
    and
    AccessCheckCAR(ncRoot, Ds-Replication-Get-Changes-In-Filtered-Set)
      = false) then
    fRevealFilteredSet := false
  endif
endif

if (fRevealSecret = false) or (fRevealFilteredSet = false)
  return false
else
  return true
endif
 
Show:
© 2014 Microsoft