You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Able to assign group admin to unexisting group #5868
In the controls bar behind the password field, click the "Groups" dropdown
Click "+ add group"
Type in "unexist"
Close the dropdown, do NOT click "Create".
In the user list, assign a user to the group "unexist"
Refresh the page
Expected result
At step 6, the non-existing group should not happen yet in the "Group admin" dropdown of the users list.
Actual result
Possible to select the not existing group.
After refresh the dropdown appears empty because it tries to select a value that it not in the dropdown.
The database table oc_group_admin has an entry with the non-existing group.
Versions
OC 6 beta 4
This is not a showstopper, as it doesn't break much.
It is still possible to create group admins.
Is there a reason why we're not using foreign keys to prevent such cases, maybe database compatibility ? @DeepDiver1975
BTW, wouldn't it be better to add integer autoincrement ID field to the users and groups tables ?
(since these fields are used in other tables, that would be more "academic" I guess, otherwise the space is wasted for storing multiple copies of arbitrary strings). However it might require some code rewriting...
Activity
PVince81 commentedon Nov 14, 2013
Setting to OC7 as it's not a showstopper.
DeepDiver1975 commentedon Nov 15, 2013
My evil me wants to answer: some devs have no clue about proper database design 👿
But at the end it comes down to the broad support of databases - e.g. MySQL engine MyISAM has no clue about foreign keys
tigran-a commentedon Dec 9, 2013
BTW, wouldn't it be better to add integer autoincrement ID field to the users and groups tables ?
(since these fields are used in other tables, that would be more "academic" I guess, otherwise the space is wasted for storing multiple copies of arbitrary strings). However it might require some code rewriting...
DeepDiver1975 commentedon Jan 9, 2015
@MorrisJobke please have a look once you work on user management for 8.1 - THX
PVince81 commentedon Feb 4, 2015
or @LukasReschke.
I haven't retried in 8.0 yet
PVince81 commentedon Aug 17, 2015
Still happening on master (8.2 pre-alpha)
rullzer commentedon Dec 22, 2015
I can't reprodce this anymore. The user page does not even shot the bug anymore and the subadmin stuff should not also properly handle this.
@PVince81 please confirm and close ;)
PVince81 commentedon Dec 23, 2015
Works fine now on master 1b36987 / 9.0 pre-alpha
lock commentedon Aug 7, 2019
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.