Page 1 of 1

Deploying a WAPT package with options

Published: May 13, 2020 - 2:48 PM
by Patrice_minagri
Good morning,

First, the context: Let's imagine I need a package that can run differently depending on the user's profile (by adding plugins based on user roles). And that the profiles are not differentiated by membership in a particular group and that there is no file that allows defining a profile.

Is it possible to run a package with an option to retrieve the option as a variable and execute the part of the Python code that corresponds to the value of the tested variable (like the operation of a function in the end).
Example: wapt-get install agri-7zip -profile (or option)

THANKS.

Patrice

Re: Deploying a WAPT package with options

Published: May 13, 2020 - 3:03 PM
by vcardon
Patrice_minagri wrote: May 13, 2020 - 2:48 PM First, the context: Let's imagine I need a package that can run differently depending on the user's profile (by adding plugins based on user roles). And that the profiles are not differentiated by membership in a particular group and that there is no file that allows defining a profile.
Hello Patrick,

Python allows you to do anything you can imagine.

The setuphelpers are there to help, but you can also use classic Python functions to read data from a file, look up values ​​in registry databases, consult an external repository (LDAP, AD, DBMS, etc.).

However, I don't quite see how you're going to make what you're trying to do reliable; how do you differentiate the roles of your users?

Sincerely.

Vincent