Skip to content

Commit

Permalink
Fix remove user
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Oct 25, 2024
1 parent bec293d commit 8caecd2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
omr-vps-admin (0.14+20241025) unstable; urgency=medium

* Fix remove user

-- OpenMPTCProuter <[email protected]> Fri, 25 Oct 2024 11:50:30 +0200

omr-vps-admin (0.13+20241025) unstable; urgency=medium

* Fix Shadowsocks-go new API support on add/remove user

-- OpenMPTCProuter <[email protected]> Fri, 25 Oct 2024 10:09:14 +0200
-- OpenMPTCProuter <[email protected]> Fri, 25 Oct 2024 10:09:14 +0200

omr-vps-admin (0.13+20241016) unstable; urgency=medium

* Add Shadowsocks-go new API support
* Add option to disable 6in4

-- OpenMPTCProuter <[email protected]> Wed, 16 Oct 2024 15:49:13 +0200
-- OpenMPTCProuter <[email protected]> Wed, 16 Oct 2024 15:49:13 +0200

omr-vps-admin (0.12+20240920) unstable; urgency=medium

Expand Down
2 changes: 1 addition & 1 deletion omr-admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3369,10 +3369,10 @@ def remove_user(*, params: RemoveUser, current_user: User = Depends(get_current_
return {'result': 'permission', 'reason': 'Need admin user', 'route': 'remove_user'}
with open('/etc/openmptcprouter-vps-admin/omr-admin-config.json') as f:
content = json.load(f)
shadowsocks_port = content['users'][0][params.username]['shadowsocks_port']
userid = int(content['users'][0][params.username]['userid'])
del content['users'][0][params.username]
if os.path.isfile('/etc/shadowsocks-libev/manager.json'):
shadowsocks_port = content['users'][0][params.username]['shadowsocks_port']
remove_ss_user(str(shadowsocks_port))
if os.path.isfile('/etc/shadowsocks-go/server.json'):
remove_ss_go_user(params.username)
Expand Down

0 comments on commit 8caecd2

Please sign in to comment.