Skip to content

Commit

Permalink
Remove ban_networks_min_prefix_len
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Nov 27, 2024
1 parent 408a572 commit 003d3d0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
14 changes: 0 additions & 14 deletions binderhub/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,19 +736,6 @@ def _cast_ban_networks(self, proposal):

return networks

ban_networks_min_prefix_len = Integer(
1,
help="The shortest prefix in ban_networks",
)

@observe("ban_networks")
def _update_prefix_len(self, change):
if not change.new:
min_len = 1
else:
min_len = min(net.prefixlen for net in change.new)
self.ban_networks_min_prefix_len = min_len or 1

tornado_settings = Dict(
config=True,
help="""
Expand Down Expand Up @@ -928,7 +915,6 @@ def initialize(self, *args, **kwargs):
"debug": self.debug,
"launcher": self.launcher,
"ban_networks": self.ban_networks,
"ban_networks_min_prefix_len": self.ban_networks_min_prefix_len,
"build_pool": self.build_pool,
"build_token_check_origin": self.build_token_check_origin,
"build_token_secret": self.build_token_secret,
Expand Down
1 change: 0 additions & 1 deletion binderhub/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def reset():
app.tornado_app.settings,
{
"ban_networks": app.ban_networks,
"ban_networks_min_prefix_len": app.ban_networks_min_prefix_len,
},
):
r = await async_requests.get(url)
Expand Down

0 comments on commit 003d3d0

Please sign in to comment.