public override async Task GetPermissions(UserPermissionRequest user, IServerStreamWriter <UserPermissionReplay> responseStream, ServerCallContext context) { var permissions = await _permissionsService.GetByUserIdAsync(user.Id); foreach (var permission in permissions) { await responseStream.WriteAsync(new UserPermissionReplay { Permission = (int)permission.UserPermission }); } }