3.1.1.4.5.22 msDS-QuotaEffective
Let TO be the object from which the msDS-QuotaEffective attribute is being read.
Let R be the root object of the NC containing TO.
Let SID be the sid specified by the LDAP extended control LDAP_SERVER_QUOTA_CONTROL_OID or, if none is specified, the requester's SID.
Let SIDS be the set of SIDs including SID and the set of SIDs returned by tokenGroups.
The value of TO!msDS-QuotaEffective is the maximum of all O!msDS-QuotaAmount for each object O where:
(TO is the object:
GetWellknownObject(n: R, guid: GUID_NTDS_QUOTAS_CONTAINER_W))
and (O is a child of TO)
and (the client has access to O as specified in section 3.1.1.4.3)
and (the client has access to O!msDS-QuotaAmount as specified in section 3.1.1.4.3)
and (the client has access to O!msDS-QuotaTrustee as specified in section 3.1.1.4.3)
and (there exists S in SIDS such that S is equal to O!msDS-QuotaTrustee)