Пример #1
0
        public async Task RemoveAsync(IEnumerable <string> targetClientIds, IEnumerable <string> allowedClientIds = null)
        {
            if (allowedClientIds != null)
            {
                var notAllowedClientIds = allowedClientIds.Except(targetClientIds);
                if (notAllowedClientIds.Any())
                {
                    throw new IamException(HttpStatusCode.BadRequest, "无权操作");
                }
            }

            await _clientRepo.RemoveAsync(targetClientIds);
        }