byceps.cli.commands.export_roles   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 22
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A export_roles() 0 5 1
1
"""
2
byceps.cli.command.export_roles
3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
5
Export roles and their assigned permissions as TOML to STDOUT.
6
7
:Copyright: 2014-2025 Jochen Kupperschmidt
8
:License: Revised BSD (see `LICENSE` file for details)
9
"""
10
11
import click
12
from flask.cli import with_appcontext
13
14
from byceps.services.authz import impex_service
15
16
17
@click.command()
18
@with_appcontext
19
def export_roles() -> None:
20
    """Export authorization roles."""
21
    print(impex_service.export_roles())
22