-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(users): Store and load a user's manager #38013
Conversation
Nice to have: remove the uid when the manager is deleted. A listener for user deleted is already there: https://github.com/nextcloud/server/blob/master/apps/provisioning_api/lib/Listener/UserDeletedListener.php |
* | ||
* @return string[] | ||
*/ | ||
public function getManagerUids(): array; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: Those are very specific new methods in IUser
, just for metadata elements. Maybe make it more generic so that it can absorb every kind of contact information we could give it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so too but that's tricky with types. Some properties are string, some are nullable string, this is a string array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great design-wise!
Is that done @hamza221 or do we miss anything? |
Done |
Mapping is done too. |
/compile / |
@@ -215,6 +231,7 @@ | |||
:show-config="showConfig" | |||
:sub-admins-groups="subAdminsGroups" | |||
:user="user" | |||
:users="users" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- BUG this only looks at the local users. If you go to a group you can only assign a manger from the same group. If you have thousands of users and only the first x are visible you can only pick from those x.
The multiselect has to search users on the backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hamza221 could you address this please? You will have to use the components async search callback feature and fetch users from the server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems addressed. Users are looked up on the server now 👍
Turns out uid!=displayname for my test user. searching by display name works 👍 |
960893d
to
9ebbe1f
Compare
Files sharing acceptance test fails. Most likely unrelated? |
9ebbe1f
to
3a1bb8b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Took a random other PR and it's the same tests that fail: #38188 https://drone.nextcloud.com/nextcloud/server/33791/36/3 😌 The tests are broken in general. Everything is fine. |
3a1bb8b
to
549be4c
Compare
Rebased because I can't restart Drone |
acceptance-app-files-sharing fails reliably |
When locally running the acceptance tests the Nextcloud logs show ( The Notifications app is installed when setting up the acceptance tests environment, but if present the existing app will be used without downloading it again. The failing acceptance tests pass after adding the following to an existing apps/notifications/lib/FakeUser.php:
|
You are the best, honestly. |
Alright. I'm giving this PR a final rebase. nextcloud/notifications#1544 is pending. If it gets merged soon the tests will pass here. |
1c19b59
to
f502666
Compare
seems some rebuilds are needed. fyi, there'll be a nc/vue bump following as well. |
OK can you tell me if I should rebase already or wait for the vue bump merge @blizzz? Cheers |
@@ -142,6 +142,20 @@ | |||
<div v-if="showConfig.showStoragePath" class="storageLocation" /> | |||
<div v-if="showConfig.showUserBackend" class="userBackend" /> | |||
<div v-if="showConfig.showLastLogin" class="lastLogin" /> | |||
<div :class="{'icon-loading-small': loading.manager}" class="modal__item managers"> | |||
<NcMultiselect ref="manager" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NcMultiselect is actually deprecated because it is not accessible, but I see it's used in this flie all over, so okay for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
showtime |
there are not just bundle conflicts. we have to adjust the front-end after #37870 |
f502666
to
e89971d
Compare
the table looks bad but that's coming from #37870 (comment) the feature works |
Co-Authored-By: hamza221 <[email protected]> Signed-off-by: Christoph Wurst <[email protected]>
e89971d
to
1381c4c
Compare
Psalm failure is unrelated |
Summary
Allow (sub) admins to set a user's manager.
TODO
Screenshot
Checklist