-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add options to module-hide/module-forbid to explicitly hide/forbid modules based on user/group #520
Comments
Hello Jérémy, For such use case, Would you like to craft a pull request for such feature? It should be quite easy as the code to add/change is located in a single procedure: Best regards, |
Hello Xavier, Thanks for your quick reply and suggestion. I made a first attempt in Do you see a better way to handle the new Regards, |
Nice start! I think there should be a way to avoid using a Could you create a pull request. It will be simpler to review the proposed code. |
@jdechard I think # are criteria met
set apply [expr {($user || $group || (!$notuser && !$notgroup)) &&\
($isbefore || $isafter || (![info exists before] && ![info exists\
after]))}]
# is end limit near ?
set isnearly [expr {!$apply && ($user || $group || (!$notuser &&\
!$notgroup)) && [info exists after] && !$isafter && [getState\
clock_seconds] >= ($after - $nearsec)}] I may include this work in the next release (v5.4) if it is completed at the end of this month. |
Add --group and --user options to module-hide, module-forbid and module-tag modulefile commands. When set, restriction or tag specifically applies to the list of user and/or to the list of group defined. Fixes cea-hpc#520
Hello,
As far as I understand, the current hide/forbid feature of Modules allows to:
soft
andhard
options)--not-user
/--not-group
optionsLet's consider the following situation:
user1
,user2
, ...,user1000
) have visibility/access to all modules (module1
,module2
, ...,module999
)module1000
) is addedmodule1000
foruser1000
only, how can I do it neatly?My first thougths:
module-hide module1000
command will hidemodule1000
for all users, it is not what we want.--not-user
I will have a very long file containing:with maintainability issue: when creating a new user I will have to add it to this
.modulerc
file otherwise module1000 will be hidden to him or when restricting access to another module.Is there a solution that I miss with the current implementation of
module-hide
/module-forbid
?If not, it would be nice to have an option to explictely hide/forbid a module to a given user/group like
module-hide --for-user user1000 module1000
. It will allow to handle the situation where hidden/forbid modules are a corner-cases and exceptions to very specific users/groups instead to be based on mutual exclusion.Thank you in advance for your advice and let me know if further explanations are needed,
Best regards,
The text was updated successfully, but these errors were encountered: