Skip to content

Commit

Permalink
fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Sep 12, 2023
1 parent 641eaae commit 1b5c2f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wis2box-management/wis2box/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,15 @@ def is_restricted_topic(ctx, topic_hierarchy):
th, _ = validate_and_load(topic_hierarchy)
click.echo(not is_resource_open(th.dotpath))


@click.command()
@click.pass_context
@click.option('--path', '-p')
def is_restricted_path(ctx, path):
"""Check if path has access control"""
click.echo(not is_resource_open(path))


@click.command()
@click.pass_context
@cli_helpers.OPTION_TOPIC_HIERARCHY
Expand All @@ -133,6 +135,7 @@ def has_access_topic(ctx, topic_hierarchy, token):
th, _ = validate_and_load(topic_hierarchy)
click.echo(is_token_authorized(th.dotpath, token))


@click.command()
@click.pass_context
@click.option('--path', '-p')
Expand All @@ -141,6 +144,7 @@ def has_access_path(ctx, path, token):
"""Check if a token has access to a path"""
click.echo(is_token_authorized(path, token))


@click.command()
@click.pass_context
@cli_helpers.OPTION_TOPIC_HIERARCHY
Expand Down

0 comments on commit 1b5c2f0

Please sign in to comment.