-
Notifications
You must be signed in to change notification settings - Fork 2.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
Group name vs display name #7918
Comments
Yes, it is reasonable to extend the display name to groups. Since the handling for users is there and groups are likely a bit easier to deal with in this regard, it should not be too difficult to get it done. |
Perhaps a set of functions, similar to the ones available for users, such as |
@DeepDiver1975 @butonic we will need a display name for the custom groups feature to be able to support renaming. The group id would be a generated id but the display name entered by the users. Setting to 9.2 |
Currently the main problem is that the group backend interface Then we extend Or for all have brand new interfaces and write an adapter to keep compatibility with older group backends. The same should be done at some point for the user backend as well, but not as part of this one task. |
Oh no... I looked into the code and it looks worse than I thought. Actually the private So it is not suitable to store the display name as part of this instance. But the part that worries me most is about already supporting duplicate group ids from different backends. While this set of classes seem to support it it will likely explode on other layers... So far, need to find a new home for the display name attribute then. I hope we won't need to reinvent the whole user / group manager thing... |
Interestingly the user backend only supports single ids. Now I'd be tempted to say that starting with 9.2 we won't support duplicate group names any more. Or if we introduce display names anyway, how about namespacing them by backend id ? For example LDAP groups would use the $gid "user_ldap_somegroup1" for the LDAP group "somegroup1". |
Ok forget about namespacing for now, it's too complicated. Let's say if there are setups out there that do have multiple group names, only one can win, the first backend would win. So everywhere the group id was specified like in share_with column would anyway be resolved to the first one. So what we can do is enforce that only the first group backend wins. |
Just did some testing: create a local group "Box10" then setup LDAP where there's also a group "Box10". But it still doesn't prevent a non-clever backend to just return the same group name. Ok, and if I try to add a local user into a LDAP group it just does nothing and disappears on refresh. At first I thought this "feature" of having multiple backends providing the same group id was to somehow allow adding people of one group backend into the group of another backend. But no. Good. |
Uh oh... while I can't add a local user to a LDAP group, I can add a LDAP user to a local group, the user appears in the |
Well if we HAD a group backend somewhere out there that would simply return group ids without preprocessing conflicts: it would be possible to add local users to any of them because for OC it is virtually only a single group. So any user added to the group would appear in So maybe that logic of merging the groups into a single virtual group does (or did in the past) make sense. But the sad part is that the virtual group doesn't have any entry in the database. So maybe we also need a group table that contains the groups from all backends ? (mentioned in the user account table ticket here #23558 (comment)). Or should there be a mapping table that creates a local alias for any remote group, and takes care that the alias is unique ? |
Adding a display name and potentially further group info means that we also need to "merge" this info somehow into the virtual group, which isn't really possible in case they are different. Maybe in the case of the display name we only take the one from the first backend then in case of conflict ? |
WIP PR here #26750 |
|
Display name support was added in backend, so this is there. For the remaining tasks let's use the other ticket #12600 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The database users and groups storage represents a user with a 'username' and a 'full name', where the username is deemed unique and used as a UID. The same is not true of groups - there is only a 'group name', which must be unique but should be the pretty name.
This causes problems with LDAP, where groups are defined using a unique attribute and (sometimes) a display name. Setting the advanced options in user_ldap to use
displayName
as the group name makes ownCloud start using that display name in equivalent places to where a user's UID is used, such as mount configurations. The current workaround is to use a unique attribute for the group display name, but this isn't desirable as unique =/= pretty.It would be useful for groups to be treated similarly to users, with a unique 'group name' and a 'display name', which are independent of each other.
The text was updated successfully, but these errors were encountered: