FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Create console command to view global config by carbsrule · Pull Request #1105 · oroinc/platform · GitHub

Create console command to view global config - #1105

Open
carbsrule wants to merge 12 commits into
oroinc:masterfrom
carbsrule:feature/config-view-command
Open

Create console command to view global config#1105
carbsrule wants to merge 12 commits into
oroinc:masterfrom
carbsrule:feature/config-view-command

Conversation

Copy link
Copy Markdown

Currently an administrator can update the Oro config via the CLI using oro:config:update

This adds oro:config:view which enables viewing the current config

Copy link
Copy Markdown
Member

Hi @carbsrule

Thank you for your contribution, it could be quite useful for some developers/adminstrators.

In order for this to be accepted though, it needs some additional changes:

  1. Properly support output of different data types. If some value cannot be pretty-printed, the command should indicate it.
  2. It should properly handle (i.e. not show) sensitive values - if the value is masked in the system configuration UI, it should be masked in this command's output as well.
  3. Tests - please look at how other commands are tested. Most likely we will need a functional test and a unit test to properly cover the (updated version of) this command.

Thank you

Copy link
Copy Markdown
Author

@mbessolov

  1. Pretty printing is simple enough and I have (uncommitted) code to handle array|object|bool configs
  2. Seems possible using oro_config.provider.system_configuration.form_provider (Oro\Bundle\ConfigBundle\Provider\SystemConfigurationFormProvider) to work out how the field is configured, although TBH I'm not sure if this is desired behaviour. The oro:config:update command is completely unaware of the system config UI, and thus, for example, will dump a plain text value into a field which is meant to be encrypted, so for me it makes sense for this mirror command to behave in a similarly unaware fashion. A user who has access to the CLI likely has access to the DB anyway, so this is just (meant to be) a convenient way of grabbing the value without needing to write an SQL query or manually decode the value. Thoughts?
  3. I haven't looked at this yet but can do so

Copy link
Copy Markdown
Author

@mbessolov I've blocked access to encrypted fields (a possible improvement would be to support a --decrypt flag which would display an encrypted value as though the data were unencrypted), and have added unit and functional tests. I think this is ready, at least for my purposes.

Copy link
Copy Markdown
Member

@carbsrule thank you, looks great.

Please review and sign the contributor license agreement at https://oroinc.com/b2b-ecommerce/contributor-license-agreement/ so that we can merge you contribution to Oro codebase.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL