Commit 3119f2d2 authored by Janis Streib's avatar Janis Streib 🦉

FIX: macfinder: use correct user object

parent 8cc5b49e
Pipeline #130045 passed with stages
in 5 minutes and 56 seconds
......@@ -40,6 +40,7 @@ def create_job():
return jsonify({'success': False, 'error': 'invalid_mac'}), 400
vlan_valid = False
vlans = VLAN.get_by_bcd(db, get_db_conn(), request.json['bcd'])
user = request.environ['beaker.session']['login']
for vlan in vlans:
if not user.has_permission('nm.macfinder_global'):
if user.has_bcd(vlan.bcd):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment