nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.5k stars 4.08k forks source link

App store shows group gid instead of displayname when restricting access #37333

Open mkrecek234 opened 1 year ago

mkrecek234 commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

Create a user group ˋtestˋ as an admin. Rename the user group to ˋfoò Go to NC Apps section and select any active app Restrict app access to a group

The list of groups selectable are showing the ˋgidˋ unique name, here ˋtestˋ - renaming that group did not change the ˋgidˋ but only ˋdisplaynamè

Expected: The app store group selector should show displayname not gid

Steps to reproduce

See above

Expected behavior

See above

Installation method

Community Web installer on a VPS or web space

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

N/A

List of activated Apps

N/A

Nextcloud Signing status

N/A

Nextcloud Logs

N/A

Additional info

N/A

szaimen commented 1 year ago

Hi, which nc version?

mkrecek234 commented 1 year ago

NC 26

joshtrichards commented 1 year ago

Predates v26. Reproduced in v25.

joshtrichards commented 1 year ago

The issue may be here: https://github.com/nextcloud/server/blob/014a6346359b89f15ca163149a29388b81cc8298/apps/settings/src/components/AppDetails.vue#L201

Shouldn't this be something more like:

return this.app.groups

It doesn't seem the map method call serves a purpose here. And even if it does serve one that I'm not seeing, it does not seem like this could possibly being doing what was intended since every group object's id and name elements will both end up being populated with objects that each contain the entire (and same) id and name arrays themselves (!)

joshtrichards commented 2 months ago

Related: #36840