aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Support/Subscription/IAssertion.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Support/Subscription/IAssertion.php')
-rw-r--r--lib/public/Support/Subscription/IAssertion.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/public/Support/Subscription/IAssertion.php b/lib/public/Support/Subscription/IAssertion.php
new file mode 100644
index 00000000000..973800ba854
--- /dev/null
+++ b/lib/public/Support/Subscription/IAssertion.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCP\Support\Subscription;
+
+use OCP\HintException;
+
+/**
+ * @since 26.0.0
+ */
+interface IAssertion {
+ /**
+ * This method throws a localized exception when user limits are exceeded,
+ * if applicable. Notifications are also created in that case. It is a
+ * shorthand for a check against IRegistry::delegateIsHardUserLimitReached().
+ *
+ * @throws HintException
+ * @since 26.0.0
+ */
+ public function createUserIsLegit(): void;
+}