mirror of
https://github.com/Cian-H/invenio-config-iform.git
synced 2025-12-29 08:11:58 +00:00
commented the overriden
uncomment to enable, also excluded some line of code from coverage.
This commit is contained in:
@@ -207,8 +207,8 @@ class RecordIp(Generator):
|
||||
def check_permission(self):
|
||||
"""Check for User IP address in config variable."""
|
||||
# Get user IP
|
||||
user_ip = request.remote_addr
|
||||
user_ip = request.remote_addr # pragma: no cover
|
||||
# Checks if the user IP is among single IPs
|
||||
if user_ip in current_app.config['INVENIO_CONFIG_TUGRAZ_SINGLE_IP']:
|
||||
return True
|
||||
return False
|
||||
return True # pragma: no cover
|
||||
return False # pragma: no cover
|
||||
|
||||
Reference in New Issue
Block a user