Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(occ): add json output option to admin-delegation:show #51124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

leftybournes
Copy link

@leftybournes leftybournes commented Feb 28, 2025

Summary

Add option to output json with admin-delegation:show using --output=json or --output=json_pretty

Example Output (plain json):

{"currentDelegations":[{"section":"overview","delegations":[{"name":"Security & setup checks","settingId":"OCA\\Settings\\Settings\\Admin\\Overview","delegatedToGroups":""}]},{"section":"server","delegations":[{"name":"Background jobs","settingId":"OCA\\Settings\\Settings\\Admin\\Server","delegatedToGroups":""}]},{"section":"sharing","delegations":[{"name":"Global","settingId":"OCA\\Settings\\Settings\\Admin\\Sharing","delegatedToGroups":""}]},{"section":"theming","delegations":[{"name":"Global","settingId":"OCA\\Theming\\Settings\\Admin","delegatedToGroups":""}]},{"section":"ai","delegations":[{"name":"Artificial Intelligence","settingId":"OCA\\Settings\\Settings\\Admin\\ArtificialIntelligence","delegatedToGroups":""}]},{"section":"admindelegation","delegations":[{"name":"Users","settingId":"OCA\\Settings\\Settings\\Admin\\Users","delegatedToGroups":""},{"name":"Webhooks","settingId":"OCA\\WebhookListeners\\Settings\\Admin","delegatedToGroups":""}]}]}

Example Output (pretty json):

{
    "currentDelegations": [
        {
            "section": "overview",
            "delegations": [
                {
                    "name": "Security & setup checks",
                    "settingId": "OCA\\Settings\\Settings\\Admin\\Overview",
                    "delegatedToGroups": ""
                }
            ]
        },
        {
            "section": "server",
            "delegations": [
                {
                    "name": "Background jobs",
                    "settingId": "OCA\\Settings\\Settings\\Admin\\Server",
                    "delegatedToGroups": ""
                }
            ]
        },
        {
            "section": "sharing",
            "delegations": [
                {
                    "name": "Global",
                    "settingId": "OCA\\Settings\\Settings\\Admin\\Sharing",
                    "delegatedToGroups": ""
                }
            ]
        },
        {
            "section": "theming",
            "delegations": [
                {
                    "name": "Global",
                    "settingId": "OCA\\Theming\\Settings\\Admin",
                    "delegatedToGroups": ""
                }
            ]
        },
        {
            "section": "ai",
            "delegations": [
                {
                    "name": "Artificial Intelligence",
                    "settingId": "OCA\\Settings\\Settings\\Admin\\ArtificialIntelligence",
                    "delegatedToGroups": ""
                }
            ]
        },
        {
            "section": "admindelegation",
            "delegations": [
                {
                    "name": "Users",
                    "settingId": "OCA\\Settings\\Settings\\Admin\\Users",
                    "delegatedToGroups": ""
                },
                {
                    "name": "Webhooks",
                    "settingId": "OCA\\WebhookListeners\\Settings\\Admin",
                    "delegatedToGroups": ""
                }
            ]
        }
    ]
}

Checklist

@leftybournes leftybournes force-pushed the admin-delegation-json-output branch from 73bf32a to cfb7568 Compare February 28, 2025 08:54
@susnux susnux requested review from a team, icewind1991, artonge and nfebe and removed request for a team February 28, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please add JSON output to admin-delegation:show
1 participant