AlistGo / AlistGo/alist

“角色”和“用户”配置相关问题

Đang mở
#9,645 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Go
Star
50.2k
Fork
7.9k
Merge trung bình
7 ngày 21 giờ
Pull request đã merge (30 ngày)
6

Mô tả

### Please make sure of the following things

- [x] I have read the [documentation](https://alistgo.com).
我已经阅读了[文档](https://alistgo.com)。

- [x] I'm sure there are no duplicate issues or discussions.
我确定没有重复的issue或讨论。

- [x] I'm sure it's due to `AList` and not something else(such as [Network](https://alistgo.com/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host) ,`Dependencies` or `Operational`).
我确定是`AList`的问题,而不是其他原因(例如[网络](https://alistgo.com/zh/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host),`依赖`或`操作`)。

- [x] I'm sure this issue is not fixed in the latest version.
我确定这个问题在最新版本中没有被修复。

### AList Version / AList 版本

v3.64.0

### Driver used / 使用的存储驱动

本机存储,地址树

### Describe the bug / 问题描述

根据[文档](https://alistgo.com/zh/guide/advanced/user.html#%E5%9F%BA%E6%9C%AC%E8%B7%AF%E5%BE%84)
用户登录时看到的根路径应当是位于用户设置中的基本路径,但在当前版本中,由于“角色”系统的存在该设置几乎无用;

在“角色”中对相关角色组中设置基本路径“/test1”(此时用户中基本路径仅能设为“/”或“/test”)

在设置成“/”的情况下:
【"code": 200, "message": "success"】在对应用户登录时进入的是根目录“/”,主页列出文件夹“test1”,点进“test1”文件夹能正确列出其中内容

在设置成“/test1”的情况下:
【"code": 500, "message": "failed get objs: failed get dir: object not found"】不能正确进入“用户”中设置的根目录(基本路径),主页列出文件夹“test1”,点进“test1”文件夹持续显示转圈加载界面(返回响应结果如上)

另有一特殊情况,在用户对应“角色”的基本路径发生变动后,部分情况下会导致“用户”中基本路径设置清空(此时点进编辑,即使基本路径一项是必填选项,在未选情况下也可保存[请求中"base_path"中值仍是旧值,显示空白可能是因为在“角色/基本路径”发生变更后,旧值不在“用户/基本路径”可选范围内]):
【"code": 403, "message": "password is incorrect or you have no permission"】主页列出文件夹“test1”,点进“test1”文件夹显示请输入密码(返回响应结果如上)

不确定是否与 #9409 有关,其中有可能与本issue关联的[comment](https://github.com/AlistGo/alist/issues/9409#issuecomment-4029007112)
>用户的基本路径选择好像也失效了,无论基本路径选择根目录/还是自定义的目录,在访问时依旧显示根目录。

### Reproduction / 复现链接

部署的AList主页

### Config / 配置

{
"force": false,
"site_url": "",
"cdn": "",
"jwt_secret": "za1cy8lOXbQSYc5L",
"token_expires_in": 48,
"database": {
"type": "sqlite3",
"host": "",
"port": 0,
"user": "",
"password": "",
"name": "",
"db_file": "C:\\Users\\User\\AppData\\Roaming\\ci.nn.alist\\data.db",
"table_prefix": "x_",
"ssl_mode": "",
"dsn": ""
},
"meilisearch": {
"host": "http://localhost:7700",
"api_key": "",
"index_prefix": ""
},
"scheme": {
"address": "0.0.0.0",
"http_port": 5244,
"https_port": -1,
"force_https": false,
"cert_file": "",
"key_file": "",
"unix_file": "",
"unix_file_perm": "",
"enable_h2c": false
},
"temp_dir": "C:\\Users\\User\\AppData\\Roaming\\ci.nn.alist\\temp",
"bleve_dir": "C:\\Users\\User\\AppData\\Roaming\\ci.nn.alist\\bleve",
"dist_dir": "",
"log": {
"enable": true,
"name": "C:\\Users\\User\\AppData\\Roaming\\ci.nn.alist\\log\\log.log",
"max_size": 50,
"max_backups": 30,
"max_age": 28,
"compress": false
},
"delayed_start": 0,
"max_connections": 0,
"max_concurrency": 64,
"tls_insecure_skip_verify": false,
"tasks": {
"download": {
"workers": 5,
"max_retry": 1,
"task_persistant": false
},
"transfer": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"upload": {
"workers": 5,
"max_retry": 0,
"task_persistant": false
},
"copy": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"decompress": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"decompress_upload": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"s3_transition": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"allow_retry_canceled": false
},
"cors": {
"allow_origins": [
"*"
],
"allow_methods": [
"*"
],
"allow_headers": [
"*"
]
},
"s3": {
"enable": false,
"port": 5246,
"ssl": false
},
"ftp": {
"enable": false,
"listen": ":5221",
"find_pasv_port_attempts": 50,
"active_transfer_port_non_20": false,
"idle_timeout": 900,
"connection_timeout": 30,
"disable_active_mode": false,
"default_transfer_binary": false,
"enable_active_conn_ip_check": true,
"enable_pasv_conn_ip_check": true
},
"sftp": {
"enable": false,
"listen": ":5222"
},
"mcp": {
"enable": false,
"port": 5248
},
"last_launched_version": "v3.64.0"
}

### Logs / 日志

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.