Closed showaid closed 6 years ago
I found out that para client is required to delete sobject instead of using it directly(sobject.delete()).
public String forceDelete(@RequestParam Boolean confirmdelete, @RequestParam String id, HttpServletRequest req) {
Profile authUser = utils.getAuthUser(req);
if (confirmdelete && utils.isAdmin(authUser)) {
ParaObject sobject = pc.read(id);
if (sobject != null) {
sobject.delete();
logger.info("{} #{} deleted {} #{}", authUser.getName(), authUser.getId(),
sobject.getClass().getName(), sobject.getId());
}
}
return "redirect:" + ADMINLINK;
}
I changed the code from sobject.delete() to pc.delete(sobject). And the user profile shows that it is deleted user after the deletion.
However, the user can sign in again and it creates another user account which is using the same id.
My environment is using an AD server to authenticate. And maybe that's the reason why. Please take a look at this.
Thank you!
Thanks for reporting this, I fixed the bug in AdminController
, but I'm not sure why you have 3 users with the same id. Your cache might need to be cleared.
Hello @albogdano,
I hope you have a good day.
Today, I got an exception when I tried to remove an user forcefully. It's UnsupportedOperationException:
I don't exactly know why, but scoold tries to use MockSearch. It should've been LuceneSearch, right?
The para system generated a log message that it uses LuceneSearch instance.
2018-03-07 11:56:47 [34m[INFO ][0;39m Loaded new DAO, Search and Cache implementations - AWSDynamoDAO, LuceneSearch and CaffeineCache.
Could you take a look at this?
Thank you!
FYI. The scoold version I tested is the most recent commit.