Total Complexity | 1 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
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 |