Open pherk opened 5 years ago
Tested and reproducible with usermanager included in v2.0.5 of the Dashboard. Deleting a group with a member that has this as its primary group results in an error. This needs to be wrapped in a try-catch-Block in order to produce a human readable error message.
Relevant logs:
2020-04-08 11:05:57,501 [qtp1126112943-135] WARN (HttpChannel.java [handleException]:591) - /exist/apps/dashboard/bower_components/existdb-usermanager/api/group/asdf
javax.servlet.ServletException: javax.servlet.ServletException: An error occurred while processing request to /exist/apps/dashboard/bower_components/existdb-usermanager/api/group/asdf: exerr:ERROR Account 'asdf' still has 'asdf' as their primary group! [at line 201, column 5]
In function:
usermanager:delete-group(item()*) [132:9:/db/apps/dashboard/bower_components/existdb-usermanager/modules/userManager.xqm]
local:delete-group(xs:string) [332:61:/db/apps/dashboard/bower_components/existdb-usermanager/controller.xql]
sorry - didn't write that code. can't help here
steps:
usermanager 0.16.4, existdb 4.4.0, Ubuntu 16.04LTS, java8