-
-
Notifications
You must be signed in to change notification settings - Fork 826
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
Add unique slug to groups #1991
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum. |
Keep for now, probably needs some discussion. |
Do we have additional use case for this? Most problems can be solved via the ID. I do like the idea of a slug. But for forums that might handle many groups, I feel like this should be a nullable property. The slug would make sense if it ended up in URLs somewhere. Is that likely or could the rare extension in need of this provide their own slug column? |
Someone could make a discussion that adds pages to groups, but it feels like user-directory might have that covered. My main concern is provisioning: if a group gets deleted by accident and recreated, the ID changes. Also, there isn't anything logical controlling the ID. But I do see your point that this isn't necessary for core (and an extension could definitely provide a slug column) |
One of the big things I could see this solving is inter forum sync, Notably I know that @askvortsov1 has the SSO Sync Extension that is able to sync groups. The problem however is that someone trying to do SSO between forums would need to create a mapping of groups between all the forums that they perform SSO on. Even if those groups have the same names. With slugs this would be drastically simplified since they would only need to make sure that all the forums have the same slugs. |
Yeah that explains what I was trying to say a lot better, thanks Matt! And one negative of adding it via an extension is that unlike many other things, if 2 extensions both try to add this column there can be some kinda nasty collisions (or conditional migrations which I think are bad practice) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum. |
We are closing this issue as it seems to have grown stale. If you still encounter this problem with the latest version, feel free to re-open it. |
Feature Request
Is your feature request related to a problem? Please describe.
Right now, groups are difficult to manage at scale, programatically. It's possible to sync groups via IDs, but the ID is the only unique field of groups. The group name is not unique, which means it's impossible to query the API for a particular group. Therefore, if I want to build a system that sets groups from an external source, I need to hardcode, or manually insert the IDs of each group.
Describe the solution you'd like
I propose that a unique "slug" field be added to groups. This would give a human readable (and manageable) lookup system for groups. For existing groups, the slug could be generated as a combo of the group name and id ( ex. admin-1), and further configurable in the admin panel.
Justify why this feature belongs in Flarum's core, rather than in a third-party extension
It's a change to groups themselves, so core would be a natural place for it. Additionally, it would be very useful to developers who want to extend groups functionality. The difficulty of managing groups at scale is a well known issue, and this would help move towards alleviating it.
The text was updated successfully, but these errors were encountered: