private async Task CheckMaxUserOrganizationUnitMembershipCountAsync(int?tenantId, int requestedCount)
        {
            var maxCount = await organizationUnitSettings.GetMaxUserMembershipCountAsync(tenantId);

            if (requestedCount > maxCount)
            {
                throw new StudioXException($"Can not set more than {maxCount} organization unit for a user!");
            }
        }
Esempio n. 2
0
        private async Task CheckMaxUserOrganizationUnitMembershipCountAsync(int?tenantId, int requestedCount)
        {
            var maxCount = await _organizationUnitSettings.GetMaxUserMembershipCountAsync(tenantId);

            if (requestedCount > maxCount)
            {
                throw new AbpException(string.Format("Can not set more than {0} organization unit for a user!", maxCount));
            }
        }