Bug Summary:
I create first account (in the whole system) with OIDC and found that is not admin.
Steps to Reproduce:
Connect OIDC through environ vars.
Expected Behavior:
First account is admin.
Actual Behavior:
First account is user.
Environment
Open WebUI Version: 0.3.6
Originally created by @Semihal on GitHub (Jun 28, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/3496
# Bug Report
## Description
**Bug Summary:**
I create first account (in the whole system) with OIDC and found that is not admin.
**Steps to Reproduce:**
- Connect OIDC through environ vars.
**Expected Behavior:**
- First account is admin.
**Actual Behavior:**
- First account is user.
## Environment
- **Open WebUI Version:** 0.3.6
State of SQLite DB before and after create first user.
Before:
>>>fromsqlalchemyimportcreate_engine,text>>>engine=create_engine("sqlite:////<path>/webui.db")>>>connection=engine.connect()>>>connection.execute(text("select * from user")).fetchall()[]
After:
>>>connection.execute(text("select * from user")).fetchall()[('894d9af6-3108-45fa-a7db-d92b267db0b9','<first and last name>','<my email>','user','/user.png',None,xxxxxxx,xxxxx,xxxxxx,'null','null','oidc@<my email>')]
First user has user role :(
<!-- gh-comment-id:2196605387 -->
@Semihal commented on GitHub (Jun 28, 2024):
State of SQLite DB before and after create first user.
Before:
```python
>>> from sqlalchemy import create_engine, text
>>> engine = create_engine("sqlite:////<path>/webui.db")
>>> connection = engine.connect()
>>> connection.execute(text("select * from user")).fetchall()
[]
```
After:
```python
>>> connection.execute(text("select * from user")).fetchall()
[('894d9af6-3108-45fa-a7db-d92b267db0b9', '<first and last name>', '<my email>', 'user', '/user.png', None, xxxxxxx, xxxxx, xxxxxx, 'null', 'null', 'oidc@<my email>')]
```
First user has user role :(
<!-- gh-comment-id:2196624839 -->
@Semihal commented on GitHub (Jun 28, 2024):
https://github.com/cheahjs/open-webui-fork/blob/79f8620b34c098c3c42b6c17a8b0f3fb9b5efedf/backend/main.py#L2105
Set DEFAULT_USER_ROLE. This is error?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Semihal on GitHub (Jun 28, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/3496
Bug Report
Description
Bug Summary:
I create first account (in the whole system) with OIDC and found that is not admin.
Steps to Reproduce:
Expected Behavior:
Actual Behavior:
Environment
@Semihal commented on GitHub (Jun 28, 2024):
State of SQLite DB before and after create first user.
Before:
After:
First user has user role :(
@Semihal commented on GitHub (Jun 28, 2024):
https://github.com/cheahjs/open-webui-fork/blob/79f8620b34c098c3c42b6c17a8b0f3fb9b5efedf/backend/main.py#L2105
Set DEFAULT_USER_ROLE. This is error?