Closed krishna9304 closed 2 years ago
The request failed due to cors error. I am not sure how other requests went through.
Also, I am not sure deleting "Default user" and "fossy" are good idea. They are special users in FOSSology. Can you try creating a new user and check if you can delete it?
Yes, I tried adding a user and then deleting it and this time it worked fine.
Also, I have a suggestion that we should disable deletion of the "fossy" and "Delete user" by greying out these options from the dropdown.
The request failed due to cors error. I am not sure how other requests went through.
Also, I am not sure deleting "Default user" and "fossy" are good idea. They are special users in FOSSology. Can you try creating a new user and check if you can delete it?
Agree, so can you please create a PR for it?
Okay, will be creating one soon.
Description
When I go to
admin>user>delete user
and select a user and click on delete button after confirming, it breaks the portal and generates error that looks something like belowSteps to reproduce
Screenshots
https://user-images.githubusercontent.com/71918441/160529839-5fd261d6-c122-485f-9305-0c926cebf3a6.mov
Versions
Logs
Browser console is generating logs and issues related to cors.
FOSSology logs
web_1 | [Tue Mar 29 03:58:56.724246 2022] [php7:notice] [pid 50] [client 127.0.0.1:49592] [2022-03-29T03:58:56.723926+00:00] default.ERROR: invalid user name [{"file":"/usr/local/share/fossology/www/ui/core-auth.php","line":165,"function":"getUserAndDefaultGroupByUserName","class":"Fossology\\\\Lib\\\\Dao\\\\UserDao","type":"->","args":["Default User"]},{"file":"/usr/local/share/fossology/www/ui/core-auth.php","line":146,"function":"updateSession","class":"core_auth","type":"->","args":["",true]},{"file":"/usr/local/share/fossology/lib/php/Plugin/FO_Plugin.php","line":477,"function":"PostInitialize","class":"core_auth","type":"->","args":[]},{"file":"/usr/local/share/fossology/lib/php/common-plugin.php","line":229,"function":"preInstall","class":"FO_Plugin","type":"->","args":[]},{"file":"/usr/local/share/fossology/www/ui/api/Middlewares/FossologyInitMiddleware.php","line":51,"function":"plugin_preinstall","args":[]},{"file":"/usr/local/share/fossology/vendor/slim/slim/Slim/MiddlewareDispatcher.php","line":313,"function":"__invoke","class":"Fossology\\\\UI\\\\Api\\\\Middlewares\\\\FossologyInitMiddleware","type":"->","args":[{"Slim\\\\Psr7\\\\Request":[]},{"Slim\\\\Routing\\\\RouteRunner":[]}]},{"file":"/usr/local/share/fossology/www/ui/api/Middlewares/RestAuthMiddleware.php","line":58,"function":"handle","class":"class@anonymous\\u0000/usr/local/share/fossology/vendor/slim/slim/Slim/MiddlewareDispatcher.php0xffffa140b686","type":"->","args":[{"Slim\\\\Psr7\\\\Request":[]}]},{"file":"/usr/local/share/fossology/vendor/slim/slim/Slim/MiddlewareDispatcher.php","line":313,"function":"__invoke","class":"Fossology\\\\UI\\\\Api\\\\Middlewares\\\\RestAuthMiddleware","type":"->","args":[{"Slim\\\\Psr7\\\\Request":[]},{"class@anonymous":[]}]},{"file":"/usr/local/share/fossology/vendor/slim/slim/Slim/Middleware/ContentLengthMiddleware.php","line":27,"function":"handle","class":"class@anonymous\\u0000/usr/local/share/fossology/vendor/slim/slim/Slim/MiddlewareDispatcher.php0xffffa140b686","type":"->","args":[{"Slim\\\\Psr7\\\\Request":[]}]},{"file":"/usr/local/share/fossology/vendor/slim/slim/Slim/MiddlewareDispatcher.php","line":147,"function":"process","class":"Slim\\\\Middleware\\\\ContentLengthMiddleware","type":"->","args":[{"Slim\\\\Psr7\\\\Request":[]},{"class@anonymous":[]}]},{"file":"/usr/local/share/fossology/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php","line":107,"function":"handle","class":"class@anonymous\\u0000/usr/local/share/fossology/vendor/slim/slim/Slim/MiddlewareDispatcher.php0xffffa140a09b","type":"->","args":[{"Slim\\\\Psr7\\\\Request":[]}]},{"file":"/usr/local/share/fossology/vendor/slim/slim/Slim/MiddlewareDispatcher.php","line":147,"function":"process","class":"Slim\\\\Middleware\\\\ErrorMiddleware","type":"->","args":[{"Slim\\\\Psr7\\\\Request":[]},{"class@anonymous":[]}]},{"file":"/usr/local/share/fossology/vendor/slim/slim/Slim/MiddlewareDispatcher.php","line":81,"function":"handle","class":"class@anonymous\\u0000/usr/local/share/fossology/vendor/slim/slim/Slim/MiddlewareDispatcher.php0xffffa140a09b","type":"->","args":[{"Slim\\\\Psr7\\\\Request":[]}]},{"file":"/usr/local/share/fossology/vendor/slim/slim/Slim/App.php","line":215,"function":"handle","class":"Slim\\\\MiddlewareDispatcher","type":"->","args":[{"Slim\\\\Psr7\\\\Request":[]}]},{"file":"/usr/local/share/fossology/vendor/slim/slim/Slim/App.php","line":199,"function":"handle","class":"Slim\\\\App","type":"->","args":[{"Slim\\\\Psr7\\\\Request":[]}]},{"file":"/usr/local/share/fossology/www/ui/api/index.php","line":294,"function":"run","class":"Slim\\\\App","type":"->","args":[]}] []