@ddj-v2/user-management 2.0.0 → 2.1.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,77 @@
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
+ 一个为 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 或更高版本。使用前请确保您有足够的系统管理权限。