Skip to content

Conversation

@NShaforostov
Copy link
Collaborator

@NShaforostov NShaforostov commented Nov 21, 2025

This PR adds new features to the modules usage functionality:

  • common permissions settings may be specified in the separate config JSON file. Via this config, could be specified:
    • list of support contacts
    • list of possible regions
  • if such config exists:
    • in case when module is denied for the current user by set permissions, list of support contacts from config will be shown when attempting to load the module
    • possible regions from config are used for selection location permission restrictions for modules
  • if config doesn't exist:
    • general message about module permissions retriction is printed (without support contacts)
    • possible regions are loaded from the stub
  • path to the permissions config is set via the environment variable CP_CAP_MODULES_PERMISSIONS_CONFIG_PATH
  • format of the config file:
{
    "support": [
        "supportname1",
        "supportname2",
        ...
    ],
    "locations": [
        "Country1",
        "Country2",
        ...
    ]
}

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.

2 participants