Skip to content

make Provisioning API aware of multiple mails - #27474

Merged
skjnldsv merged 15 commits into
masterfrom
feat/26866/prov-api
Jun 30, 2021
Merged

make Provisioning API aware of multiple mails#27474
skjnldsv merged 15 commits into
masterfrom
feat/26866/prov-api

Conversation

@blizzz

@blizzzblizzz commented Jun 11, 2021

Copy link
Copy Markdown
Member

This extends the provisioning API as following

getUser

endpoint: ocs/v2.php/cloud/users/2d42e983-a7a8-40b1-8e4a-b8afeb5244240b

Original response

<?xml version="1.0"?>
<ocs>
<meta>…</meta>
<data>
…
<email>person_11@example.org</email>
<displayname>Isabel, Morgan (person_11)</displayname>
…
</data>
</ocs>

New, with no additional mail set

…
<email>person_11@example.org</email>
<additional_mail/>
<displayname>Isabel, Morgan (person_11)</displayname>
…

New, with one or more additional mail set

…
<email>person_11@example.org</email>
<additional_mail>
<element>test1@example.org</element>
<element>test2@example.org</element>
<element>test3@example.org</element>
</additional_mail>
<displayname>Isabel, Morgan (person_11)</displayname>
…

getEditableFields(ForUser)

endpoint: ocs/v2.php/cloud/user/fields/e8a7e882-5c5e-4f61-b6bb-bc5fd9b3cb4b

one entry added unconditionally

<?xml version="1.0"?>
<ocs>
<meta>… </meta>
<data>
…
<element>additional_mail</element>
…
</data>
</ocs>

editUser

endpoint: ocs/v2.php/cloud/users/2d42e983-a7a8-40b1-8e4a-b8afeb5244240b
method: PUT

  • To add an additional email, just use 'additional_mail' as key.

  • Deleting and setting scope is not possible with this endpoint as we need the value as reference.

editUserMultiValue

endpoint: ocs/v2.php/cloud/users/2d42e983-a7a8-40b1-8e4a-b8afeb5244240b/{collectionName}
method: PUT

  • To remove a value, assign the email to the key parameter and leave the value empty. Future properties may implement renaming by using key as old value and value as new value.
  • To set the scope, append the Scope suffix to the collectionName. key is the mail address, value the scope value.

contributes to #26866

@blizzz
blizzz requested review from Pytal and skjnldsvJune 11, 2021 11:41
@blizzzblizzz added this to the Nextcloud 22 milestone Jun 11, 2021
@blizzz
blizzzforce-pushed the feat/26866/prov-api branch 2 times, most recently from e3eaac3 to 84d1cd2CompareJune 11, 2021 14:14
Comment threadlib/private/Accounts/AccountManager.php Outdated
@blizzz
blizzzforce-pushed the feat/26866/prov-api branch 2 times, most recently from 3f5a7b0 to 3637af2CompareJune 14, 2021 11:05
@skjnldsv
skjnldsv removed their request for review June 14, 2021 12:13
@skjnldsv

This comment has been minimized.

@blizzz
blizzzforce-pushed the feat/26866/prov-api branch from 085fd99 to 784b61eCompareJune 14, 2021 17:06
@blizzzblizzz mentioned this pull request Jun 16, 2021
45 tasks
@blizzz
blizzzforce-pushed the feat/26866/prov-api branch from 5a6216b to 9a320f1CompareJune 17, 2021 00:05
Comment threadlib/private/Accounts/AccountManager.php Outdated
@blizzz
blizzzforce-pushed the feat/26866/prov-api branch 2 times, most recently from fb905d4 to ee5b4acCompareJune 22, 2021 16:23
Comment threadlib/private/Accounts/AccountManager.php Outdated
@blizzzblizzz mentioned this pull request Jun 23, 2021
39 tasks
@blizzzblizzz modified the milestones: Nextcloud 22, Nextcloud 23Jun 24, 2021
@blizzz
blizzzforce-pushed the feat/26866/prov-api branch 3 times, most recently from e33d30a to 3561025CompareJune 25, 2021 19:40
@Pytal

This comment has been minimized.

@blizzz

This comment has been minimized.

@blizzz
blizzzforce-pushed the feat/26866/prov-api branch from bd9dafe to 38a2a6bCompareJune 29, 2021 11:46
@Pytal

This comment has been minimized.

blizzz added 7 commits June 30, 2021 00:47
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
- format as stored previously in oc_accounts table is kept
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
- fixes wrong veriable usage also
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz
blizzzforce-pushed the feat/26866/prov-api branch from ff99a05 to 19d014fCompareJune 29, 2021 22:50
@blizzz
blizzz marked this pull request as ready for review June 29, 2021 22:50
@blizzzblizzz added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jun 29, 2021
@blizzz
blizzzforce-pushed the feat/26866/prov-api branch from 19d014f to ad0a11bCompareJune 29, 2021 23:03
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

@PytalPytal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉🎉🎉

@skjnldsv
skjnldsv merged commit 9124c69 into masterJun 30, 2021
@skjnldsv
skjnldsv deleted the feat/26866/prov-api branch June 30, 2021 05:13
@skjnldsv

Copy link
Copy Markdown
Member

/backport to stable22

Comment threadapps/provisioning_api/appinfo/routes.php
@PytalPytal mentioned this pull request Jul 1, 2021
9 tasks
@blizzzblizzz added the pending documentation This pull request needs an associated documentation update label Jul 1, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancementpending documentationThis pull request needs an associated documentation update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@blizzz@skjnldsv@Pytal@nickvergessen