actinia-org / actinia-module-plugin

Contains actinia module self-description and process-chain-template management and processing
Apache License 2.0
2 stars 3 forks source link

Endpoint grass_modules and modules only lists accessible grass modules #12

Closed griembauer closed 3 years ago

griembauer commented 3 years ago

This PR adapts the /grass_modules and /modules endpoint such that only those grass modules which are permitted to be used by the authenticated user are listed. The permitted grass modules are stored in the redis db as accessible_modules and are saved when a user is created (by default from the whitelisted modules from the config) or updated. In this PR, they are compared against the "complete" grass module list that is generated in core.modules.grass.createModuleList. However this only applies to non-admin users. admin and superadmin users effectively have access to the complete range of grass modules, even though they may have only a limited list in their accessible_modules stored in redis. Tests are adapted and added accordingly.

Following PRs could work on:

metzm commented 3 years ago

Very useful and IMHO userfriendly PR! This should avoid confusion, looks good to me.

griembauer commented 3 years ago

Thanks a lot for your review, I will merge now!