Skip to content
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

Rename group display names #9209

Closed
BornToBeRoot opened this issue Apr 17, 2018 · 26 comments
Closed

Rename group display names #9209

BornToBeRoot opened this issue Apr 17, 2018 · 26 comments

Comments

@BornToBeRoot
Copy link

image

Add an edit button next to the delete button to rename groups?!

Currently i have to create a new group, add everyone to the group, delete the old one...

@MorrisJobke MorrisJobke changed the title [Feature Request] Let admins rename groups in settings Rename group display names Apr 17, 2018
@MorrisJobke
Copy link
Member

Group display names were implemented in #8255 - @nickvergessen it should be possible now to also implement the renaming, right?

@nickvergessen
Copy link
Member

Well only displaying them. For 14 we should make it possible to store the displayname in the database.

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@violoncelloCH
Copy link
Member

something for 15 milestone?

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Sep 13, 2018
@DerTomm
Copy link

DerTomm commented Jan 12, 2019

... or 16 maybe? ;-)

@violoncelloCH violoncelloCH added this to the Nextcloud 16 milestone Jan 12, 2019
@redtux
Copy link

redtux commented Jul 19, 2019

What is needed for this to be implemented? It would really be great to be able to rename groups/roles. 👍

@violoncelloCH
Copy link
Member

@redtux would you want to help out here?

@nickvergessen are the display names already stored in the database?

@redtux
Copy link

redtux commented Jul 21, 2019

@violoncelloCH Depends on what needs to be done, as I am not a developer. Is this still related to #8255? (Is renaming possible in OwnCloud, so that I could have a look there?)

@nickvergessen
Copy link
Member

No, there is currently only one column:
https://github.com/nextcloud/server/blob/master/core/Migrations/Version13000Date20170718121200.php#L253-L261

So the steps would be:

  1. Add a migration to add a column to the oc_groups table
  2. Copy the ID value to the name column
  3. Adjust lib/private/Groups/ accordingly

The group object already has a dedicated method which should be used correctly everywhere.

@rullzer rullzer modified the milestones: Nextcloud 17.0.4, Nextcloud 17.0.5 Mar 11, 2020
@rullzer rullzer modified the milestones: Nextcloud 17.0.5, Nextcloud 17.0.6 Mar 23, 2020
@marshalleq
Copy link

Just registering my vote for this too. The original poster actually missed out some things from his steps obviously. Most importantly the need to copy the files into the new group and delete the old files. Not a very nice method.

@rullzer rullzer added this to the Nextcloud 17.0.8 milestone Jun 4, 2020
@putt1ck
Copy link

putt1ck commented Jul 16, 2020

Is this stalled?

@nickvergessen nickvergessen removed this from the Nextcloud 17.0.9 milestone Jul 16, 2020
@nickvergessen
Copy link
Member

Well the backend is already done, it's just missing someone to pick up the task to add it to the frontend

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Aug 20, 2020
@tigattack
Copy link

It would be great if this could be added 🙂

@fenvarien
Copy link

With many schools successfully using Nextcloud, and with more and more schools starting to use it during the pandemic, we really need this feature usable and accessible from the frontend. Otherwise the end of the school year could become quite problematic and a disappointing experience for many teachers who convinced their colleagues and principal to use Nextcloud.

@b3
Copy link

b3 commented Apr 22, 2021

Is there anyway to financially sponsor the work (paying Nextcloud to implement the frontend access to group renaming)?

@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jul 2, 2021
@ArcticFall
Copy link
Contributor

I would be willing to work on it, because my organization needs this feature.

I was thinking to add an edit button (same as the user edit button) left of the delete button and open a popover where the new name can be typed.

But I'm completely new to contributing to nextcloud and am not too farmiliar with Vue. So any pointers would be nice!

@redtux
Copy link

redtux commented Nov 17, 2021

@ArcticFall Great news, I think that what @nickvergessen wrote in a comment above is still a good starting point. See #9209 (comment)

@ArcticFall
Copy link
Contributor

ArcticFall commented Nov 17, 2021

The backend functionality mentioned in #9209 (comment) is already implemented, as far as I can see. The database has the new column, which currently has the same value as the group id. Changing the display name in the database seems to also have an effect in the frontend.

So I think only the frontend needs to be altered, to include functionality to change the display name form there.

@ArcticFall
Copy link
Contributor

ArcticFall commented Nov 17, 2021

I think I found the right places to address this. See 7cf96e2 and 42464e9.
But these changes aren't showing in my development instance of nextcloud. Do I need to do something first to see those changes?

@nickvergessen
Copy link
Member

nickvergessen commented Nov 18, 2021

Make sure you have node14 and npm7 installed and then follow this part of the readme to compile the src folder into the new js files
https://github.com/nextcloud/server#working-with-front-end-code-

In your case MODULE=settings should help

@ArcticFall
Copy link
Contributor

I figured out the frontend and js stuff and got it working until the point I actually have to make a request to the backend to change it.
But I have not been able to figure out, where to find the API documentation for that or where I would have to implement an endpoint. If anybody could help me out, that would be great.

I looked at the OCS documentation, but the user/group related stuff seems to be undocumented.

@ArcticFall
Copy link
Contributor

@nickvergessen could you give me a pointer? I wasn't able to find anything and nobody answered on the forum either...

@nickvergessen
Copy link
Member

Group and user stuff is in the admin docs
https://docs.nextcloud.com/server/latest/admin_manual/configuration_user/instruction_set_for_groups.html

But also there the rename is missing.

https://github.com/nextcloud/server/blob/master/apps/provisioning_api/appinfo/routes.php#L44

Its a put agains the group endpoint
Parameters are key=displayname and value=THe Input
https://github.com/nextcloud/server/blob/master/apps/provisioning_api/lib/Controller/GroupsController.php#L269

@ArcticFall
Copy link
Contributor

Thanks! I got everything working.
Now just making sure that everything looks good frontend wise and I can make a pull request.

@szaimen szaimen added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Dec 2, 2021
@ArcticFall
Copy link
Contributor

Closed with #30043

@kdoteu
Copy link

kdoteu commented Mar 15, 2022

I'm new to the Nextcloud release cycle. When will this feature propably in the beta or specially in the stable channel?

@nickvergessen
Copy link
Member

Beta in 2 days, stable in roughly 6 weeks
https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests