@ddj-v2/user-management 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.npmignore CHANGED
@@ -1,21 +1,21 @@
1
- # 排除所有隱藏檔案與資料夾
2
- .*
3
- !/.npmignore
4
-
5
- # 排除 CI 與開發工具設定
6
- .github/
7
- .vscode/
8
- node_modules/
9
- *.log
10
-
11
- # 排除測試與原始碼 (如果你的 build 結果在 dist/ 或 lib/)
12
- test/
13
- tests/
14
- src/
15
- __tests__/
16
- jest.config.js
17
- tsconfig.json
18
-
19
- # 排除 semantic-release 可能產生的檔案
20
- release.config.js
1
+ # 排除所有隱藏檔案與資料夾
2
+ .*
3
+ !/.npmignore
4
+
5
+ # 排除 CI 與開發工具設定
6
+ .github/
7
+ .vscode/
8
+ node_modules/
9
+ *.log
10
+
11
+ # 排除測試與原始碼 (如果你的 build 結果在 dist/ 或 lib/)
12
+ test/
13
+ tests/
14
+ src/
15
+ __tests__/
16
+ jest.config.js
17
+ tsconfig.json
18
+
19
+ # 排除 semantic-release 可能產生的檔案
20
+ release.config.js
21
21
  .releaserc
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 oRangeSumMer
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 oRangeSumMer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,77 +1,80 @@
1
- # HydroOJ插件 用户管理面板
2
-
3
- 一个为 HydroOJ 提供可视化用户管理功能的插件,允许管理员在控制面板中方便地管理用户信息、权限和状态。
4
-
5
- > 代码很简单,佛系不定期更新~
6
- >
7
- > 如果认为好用请给我点一个star,不胜感激。
8
-
9
- ## 安装方法
10
-
11
- ```bash
12
- sudo su
13
- cd /root/.hydro/
14
- git clone https://github.com/SummerofOrange/hydrooj-user-management
15
- hydrooj addon add /root/.hydro/hydrooj-user-management
16
- pm2 restart hydrooj
17
- ```
18
-
19
- ## 使用方法
20
-
21
- 1. **访问用户管理**: 登录 HydroOJ 后,在控制面板侧边栏找到"用户管理"菜单项
22
- 2. **搜索用户**: 在用户列表页面使用搜索框查找特定用户
23
- 3. **编辑用户**: 点击用户列表中的"编辑"按钮进入用户详情页面
24
- 4. **管理权限**: 在用户详情页面的"权限管理"部分设置用户权限
25
- 5. **重置密码**: 在"密码管理"部分为用户重置新密码
26
- 6. **封禁用户**: 在"用户状态"部分封禁或解封用户
27
-
28
- ## 权限说明
29
-
30
- 插件使用以下权限级别:
31
-
32
- - **-1**: root(超级管理员)
33
- - **0**: 已封禁用户
34
- - **4**: 系统保留
35
- - **8**: 访客用户
36
- - **16842756**: 默认用户权限
37
- - **其他值**: 自定义权限
38
-
39
- ## 界面展示
40
-
41
- ### 用户列表页面
42
-
43
- ![用户列表](asset/fig1.png)
44
-
45
- ### 用户详情页面
46
-
47
- ![用户详情](asset/fig2.png)
48
-
49
- ## 安全特性
50
-
51
- - ✅ 权限验证:只有具有系统管理权限的用户才能访问
52
- - ✅ 操作确认:重要操作(如重置密码、封禁用户)需要确认
53
- - ✅ 权限保护:防止非超级管理员修改超级管理员账户
54
- - ✅ 数据验证:自动验证用户名和邮箱的唯一性
55
- - ✅ 输入验证:前端和后端双重验证用户输入
56
-
57
- ## 开发说明
58
-
59
- ### 贡献代码
60
-
61
- 欢迎提交 Issue 和 Pull Request 来改进这个插件。
62
-
63
- ## 许可证
64
-
65
- MIT License
66
-
67
- ## 支持
68
-
69
- 如果您在使用过程中遇到问题,请:
70
-
71
- 1. 查看 [Issues](https://github.com/SummerofOrange/hydrooj-user-management/issues) 页面
72
- 2. 提交新的 Issue 描述您的问题
73
- 3. 联系作者获取技术支持
74
-
75
- ---
76
-
77
- **注意**: 此插件需要 HydroOJ v5.0.0-beta.6 或更高版本。使用前请确保您有足够的系统管理权限。
1
+ # HydroOJ插件 使用者管理面板
2
+
3
+ 修改自 https://github.com/SummerofOrange/hydrooj-user-management
4
+
5
+ 這是一個為 HydroOJ 提供可視化使用者管理功能的插件,讓管理員能在控制面板中方便地管理使用者資訊、權限與狀態。
6
+
7
+ > 程式碼很簡單,佛系不定期更新~
8
+ >
9
+ > 如果覺得好用請幫我點個 star,感激不盡。
10
+
11
+ ## 安裝方法
12
+
13
+ ```bash
14
+ sudo su
15
+ yarn global add @ddj-v2/user-management
16
+ hydrooj addon add @ddj-v2/user-management
17
+ pm2 restart hydrooj
18
+ ```
19
+
20
+ ## 使用方法
21
+
22
+ 1. **進入使用者管理**:登入 HydroOJ 後,在控制面板側邊欄找到「使用者管理」選單項
23
+ 2. **搜尋使用者**:在使用者列表頁面使用搜尋框查找特定使用者
24
+ 3. **編輯使用者**:點擊使用者列表中的「編輯」按鈕進入使用者詳細頁面
25
+ 4. **管理權限**:在使用者詳細頁面的「權限管理」部分設定使用者權限
26
+ 5. **重設密碼**:在「密碼管理」部分為使用者重設新密碼
27
+ 6. **封鎖使用者**:在「使用者狀態」部分封鎖或解封使用者
28
+
29
+
30
+ 1. **域用戶管理**: 可看見 default role
31
+ ## 權限說明
32
+
33
+ 插件使用以下權限等級:
34
+
35
+ - **-1**:root(超級管理員)
36
+ - **0**:已封鎖使用者
37
+ - **4**:系統保留
38
+ - **8**:訪客使用者
39
+ - **16842756**:預設使用者權限
40
+ - **其他值**:自訂權限
41
+
42
+ ## 介面展示
43
+
44
+ ### 使用者列表頁面
45
+
46
+ ![使用者列表](asset/fig1.png)
47
+
48
+ ### 使用者詳細頁面
49
+
50
+ ![使用者詳細](asset/fig2.png)
51
+
52
+ ## 安全特性
53
+
54
+ - ✅ 權限驗證:只有具有系統管理權限的使用者才能訪問
55
+ - ✅ 操作確認:重要操作(如重設密碼、封鎖使用者)需確認
56
+ - ✅ 權限保護:防止非超級管理員修改超級管理員帳戶
57
+ - ✅ 資料驗證:自動驗證使用者名稱與電子郵件唯一性
58
+ - ✅ 輸入驗證:前端與後端雙重驗證使用者輸入
59
+
60
+ ## 開發說明
61
+
62
+ ### 貢獻程式碼
63
+
64
+ 歡迎提交 Issue 與 Pull Request 改進此插件。
65
+
66
+ ## 授權
67
+
68
+ MIT License
69
+
70
+ ## 支援
71
+
72
+ 若您在使用過程中遇到問題,請:
73
+
74
+ 1. 查看 [Issues](https://github.com/SummerofOrange/hydrooj-user-management/issues) 頁面
75
+ 2. 提交新的 Issue 描述您的問題
76
+ 3. 聯絡作者取得技術支援
77
+
78
+ ---
79
+
80
+ **注意**:此插件需 HydroOJ v5.0.0-beta.6 或更高版本。使用前請確保您有足夠的系統管理權限。