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
TEAM element crashes after adding an ldap user to multiple teams and groups.
Expected Behavior
not crash
Steps to reproduce the behavior
Steps to reproduce a problem:
eLabFTW instance version 5.0.4 installed as a docker container.
Enabled LDAP:
TLS yes
anonymous binding
user attribute: mail
attr to look for the team name: empty
Create team sent by the server if it doesn't exist: disabled
if no team attr is found: INSTITUTE_USERS
if the user doesn't exist: Create on the fly
email attr: mail
firstname: givenname
lastname: cn
By default users who login via LDAP are assigned to a "specific group" called for example INSTITUTE_USERS
After adding a new LDAP user to a different Team ( Default Team in this case) and adding this new user to a new group within the Default Team access to TEAM element in sysadmin/admin context is broken.
Removing group with external user solves the problem and TEAM is working again.
2024/04/26 10:55:47 [error] 158#158: *248 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Elabftw\Models\TeamGroups::Elabftw\Models\{closure}(): Argument #1 ($userid) must be of type string, null given in /elabftw/src/models/TeamGroups.php:82
Stack trace:
#0 [internal function]: Elabftw\Models\TeamGroups->Elabftw\Models\{closure}()
#1 /elabftw/src/models/TeamGroups.php(89): array_map()
#2 /elabftw/web/admin.php(66): Elabftw\Models\TeamGroups->readAll()
#3 {main}
Next TypeError: Elabftw\Elabftw\TwigFilters::displayMessage(): Argument #1 ($message) must be of type string, null given, called in /elabftw/cache/twig/e8/e879042947e3fd2d62f5808ff9b6b0ab.php on line 53 and defined in /elabftw/src/classes/TwigFilters.php:36
Stack trace:
#0 /elabftw/cache/twig/e8/e879042947e3fd2d62f5808ff9b6b0ab.php(53): Elabftw\Elabftw\TwigFilters::displayMessage()
#1 /elabftw/vendor/twig/twig/src/Template.php(171): __TwigTemplate_b7b5e11ac17b665df6eb40a9b9fbe7f5->block_body()
#2 /elabftw/cache/twig/79/79692facd648ff8eb0e81af6139e3848.php(90): Twig\Template->d" while reading response header from upstream, client: 192.168.194.236, server: testlen.mydomian.com, request: "GET /admin.php?tab=2 HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "testlen.mydomian.com"
2024/04/26 10:55:56 [error] 158#158: *248 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Elabftw\Models\TeamGroups::Elabftw\Models\{closure}(): Argument #1 ($userid) must be of type string, null given in /elabftw/src/models/TeamGroups.php:82
Stack trace:
#0 [internal function]: Elabftw\Models\TeamGroups->Elabftw\Models\{closure}()
#1 /elabftw/src/models/TeamGroups.php(89): array_map()
#2 /elabftw/web/admin.php(66): Elabftw\Models\TeamGroups->readAll()
#3 {main}
### Additional information
_No response_
The text was updated successfully, but these errors were encountered:
Thank you for opening this issue. I tried following your description of the issue to reproduce, but didn't manage. I might be missing something. Could you please try and explain again the following part, making sure to use the correct terminology: Team for Teams created by Sysadmin, and Groups for the team groups created by Admin.
For instance:
By default users who login via LDAP are assigned to a "specific group" called for example INSTITUTE_USERS
Do you mean Team here? When created on the fly, users are added to a Team, not a Group.
After adding a new LDAP user to a different Team ( Default Team in this case) and adding this new user to a new group within the Default Team access to TEAM element in sysadmin/admin context is broken.
Could you please try and dumb it down so I can reproduce it. Make very clear step by step of what user needs to be in which team and which group to trigger the issue.
It seems you have a reproducible error, with a clear error log, so it shouldn't be hard to fix this once I manage to understand and reproduce the issue at play here.
Do you mean Team here? When created on the fly, users are added to a Team, not a Group.
Sorry, yes, I mean a Team not a Group.
I've just tried with an empty eLabFTW instance and couldn't reproduce the problem. I will need some more time to test that.
The affected instance had already data and scheduler. I guess this is an important difference.
Detailed description of the problem
TEAM element crashes after adding an ldap user to multiple teams and groups.
Expected Behavior
not crash
Steps to reproduce the behavior
Steps to reproduce a problem:
eLabFTW instance version 5.0.4 installed as a docker container.
Enabled LDAP:
By default users who login via LDAP are assigned to a "specific group" called for example INSTITUTE_USERS
After adding a new LDAP user to a different Team ( Default Team in this case) and adding this new user to a new group within the Default Team access to TEAM element in sysadmin/admin context is broken.
Removing group with external user solves the problem and TEAM is working again.
Do you have any idea what may have caused this?
No response
Do you have an idea how to solve the issue?
No response
What is your docker-compose configuration?
Output of
uname -a
Output of
cat /etc/os-release
Output of
docker info
Relevant php error log entry
The text was updated successfully, but these errors were encountered: