aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Accounts
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2021-08-20 19:59:08 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2021-09-09 14:03:35 +0200
commitaacaad2a3f56893c6be463ec7a21c868322654ee (patch)
tree0e995c930501cae44ba49ff707ddc896c6048093 /lib/public/Accounts
parent19cc757531959a14df40a79d550c82b39e4bc5a2 (diff)
downloadnextcloud-server-aacaad2a3f56893c6be463ec7a21c868322654ee.tar.gz
nextcloud-server-aacaad2a3f56893c6be463ec7a21c868322654ee.zip
implement verification for additional mails
- mails added by (sub)admins are automatically verified - provisioning_api controller as verification endpoint - IAccountProperty gets a locallyVerified property - IPropertyCollection gets a method to fetch an IAccountProperty by value - an remove equivalent was already present - AccountManager always initiates mail verification on update if necessary - add core success template for arbitrary title and message Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/public/Accounts')
-rw-r--r--lib/public/Accounts/IAccountProperty.php20
-rw-r--r--lib/public/Accounts/IAccountPropertyCollection.php9
2 files changed, 29 insertions, 0 deletions
diff --git a/lib/public/Accounts/IAccountProperty.php b/lib/public/Accounts/IAccountProperty.php
index 20505f299dd..94866fc4807 100644
--- a/lib/public/Accounts/IAccountProperty.php
+++ b/lib/public/Accounts/IAccountProperty.php
@@ -115,4 +115,24 @@ interface IAccountProperty extends \JsonSerializable {
* @since 22.0.0
*/
public function getVerificationData(): string;
+
+ /**
+ * Set the instance-based verification status of a property
+ *
+ * @since 23.0.0
+ *
+ * @param string $verified must be one of the verification constants of IAccountManager
+ * @return IAccountProperty
+ * @throws InvalidArgumentException
+ */
+ public function setLocallyVerified(string $verified): IAccountProperty;
+
+ /**
+ * Get the instance-based verification status of a property
+ *
+ * @since 23.0.0
+ *
+ * @return string
+ */
+ public function getLocallyVerified(): string;
}
diff --git a/lib/public/Accounts/IAccountPropertyCollection.php b/lib/public/Accounts/IAccountPropertyCollection.php
index 779fb1299b4..0d4c416cbaa 100644
--- a/lib/public/Accounts/IAccountPropertyCollection.php
+++ b/lib/public/Accounts/IAccountPropertyCollection.php
@@ -89,4 +89,13 @@ interface IAccountPropertyCollection extends JsonSerializable {
* @since 22.0.0
*/
public function removePropertyByValue(string $value): IAccountPropertyCollection;
+
+ /**
+ * retrieves a property identified by its value. null, if none was found.
+ *
+ * Returns only the first property if there are more with the same value.
+ *
+ * @since 23.0.0
+ */
+ public function getPropertyByValue(string $value): ?IAccountProperty;
}