mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-02-12 10:31:52 +00:00
Fix get shorewall rules
This commit is contained in:
parent
2aa968920e
commit
b9d326cf8f
1 changed files with 2 additions and 2 deletions
|
@ -1044,12 +1044,12 @@ def shorewall_list(*, params: ShorewallListparams, current_user: User = Depends(
|
|||
if params.ipproto == 'ipv4':
|
||||
with open('/etc/shorewall/rules', 'r') as f:
|
||||
for line in f:
|
||||
if '# OMR ' + name in line:
|
||||
if '# OMR ' + current_user.username + ' ' + name in line:
|
||||
fwlist.append(line)
|
||||
else:
|
||||
with open('/etc/shorewall6/rules', 'r') as f:
|
||||
for line in f:
|
||||
if '# OMR ' + name in line:
|
||||
if '# OMR ' + current_user.username + ' ' + name in line:
|
||||
fwlist.append(line)
|
||||
return {'list': fwlist}
|
||||
|
||||
|
|
Loading…
Reference in a new issue