Skip to content

Commit

Permalink
fix(jans-cli-tui): remove OPA configuration options for locak
Browse files Browse the repository at this point in the history
Signed-off-by: Mustafa Baser <[email protected]>
  • Loading branch information
devrimyatar committed Jan 21, 2025
1 parent c9b3087 commit 4187793
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions jans-cli-tui/cli_tui/plugins/120_lock/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,6 @@ def init_plugin(self) -> None:
def create_widgets(self):
self.schema = self.app.cli_object.get_schema_from_reference('Lock', '#/components/schemas/AppConfiguration')


self.opa_config_base_url = common_data.app.getTitledText(
title=_("Base URL"),
name='baseUrl',
value=self.data.get('opaConfiguration', {}).get('baseUrl', ''),
style=cli_style.edit_text,
jans_help=_("Base URL for OPA"),
widget_style=cli_style.black_bg_widget
)

self.opa_config_accessToken = common_data.app.getTitledText(
title=_("Access Token"),
name='accessToken',
value=self.data.get('opaConfiguration', {}).get('accessToken', ''),
style=cli_style.edit_text,
jans_help=_("Access token for OPA"),
widget_style=cli_style.black_bg_widget
)

self.working_container = HSplit([

common_data.app.getTitledText(
Expand Down Expand Up @@ -160,16 +141,11 @@ def create_widgets(self):
common_data.app.getTitledText(
title=_("PDP Type"),
name='pdpType',
value=self.data.get('pdpType', 'OPA'),
value=self.data.get('pdpType', ''),
style=cli_style.edit_text,
widget_style=cli_style.black_bg_widget
),

Frame(
title=_("OPA Configuration"),
body=HSplit([self.opa_config_base_url, self.opa_config_accessToken]),
),

common_data.app.getTitledText(
title=_("Policies JSON URIs Authorization Token"),
name='policiesJsonUrisAuthorizationToken',
Expand Down Expand Up @@ -242,10 +218,6 @@ def save(self):

async def lock_config_coroutine():
lock_config = self.make_data_from_dialog(tabs={'lock_config': self.working_container})
lock_config['opaConfiguration'] = {
'baseUrl': self.opa_config_base_url.me.text,
'accessToken': self.opa_config_accessToken.me.text,
}

cli_args = {'operation_id': 'put-lock-properties', 'data': lock_config}
common_data.app.start_progressing(_("Saving Lock configuration"))
Expand Down

0 comments on commit 4187793

Please sign in to comment.