Closed ckupferschmid closed 9 months ago
Hi Christian,
I just tried to reproduce your problem. Apparently I could not reproduce it with the information you provided.
Could you send me the following information via mail?
heptacom_admin_open_auth_client
table (remember to remove sensitive values like the client secret)user
table (remember to remove sensitive values like the password hash)SHOW CREATE TABLE user;
on the databaseHi @silviokennecke The problem occurs if one sets that new users should be created as non admins due to t his line: https://github.com/HEPTACOM/HeptacomShopwarePlatformAdminOpenAuth/blob/4.2.1/src/Service/UserResolver.php#L216
You run a DBAL update but do not provide the necessary types, therefore e.g. the boolean value for admin
is provided as bool instead of integer. You can either manually convert it or just provided the necessary types array e.g. ['admin' => Types::BOOLEAN]
.
This PR should fix it - at least it fixed the issue I explained above: https://github.com/HEPTACOM/HeptacomShopwarePlatformAdminOpenAuth/pull/8
I have tested the fix provided by @AndreasA and it works from what I can tell. I have a newly setup system using php 8.1 and shopware 6.4.20.2 and the issue was still the same. Manually installed the fix and it is working now. Would help, if this could be released as bug fix.
I picked it up for you as a new 4.3 release of this plugin :) the latest code is already on master.
Please try out 4.3.0-beta.1
I'll close this issue due to inactivity for now.
Plugin Version
4.2.1
PHP Version
7.4.33
Shopware Version
6.4.17.2
Installation method
Community-Store
Identity provider
Microsoft Azure OIDC
What happened?
Configured Plugin to assign other role than 'Administrator'. The error below is displayed at first login, and the account gets created with 'Administrator' role.
{"errors":[{"code":"0","status":"500","title":"Internal Server Error","detail":"An exception occurred while executing \u0027UPDATE user SET first_name = ?, last_name = ?, email = ?, admin = ?, updated_at = ? WHERE id = ?\u0027 with params [\u0022Chxxx\u0022, \u0022Kxxx\u0022, \u0022chxxx.kxxx@xxxxx.com\u0022, false, \u00222022-12-08 13:51:40.711\u0022, \u0022\xfe\x9a\x4e\xee\x25\x99\x45\x60\x83\x5a\x92\x80\x92\x49\xdd\xb5\u0022]:\n\nSQLSTATE[HY000]: General error: 1366 Incorrect integer value: \u0027\u0027 for column \u0027admin\u0027 at row 1"}]}
Relevant log output