Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add options to module-hide/module-forbid to explicitly hide/forbid modules based on user/group #520

@jdechard

Description

@jdechard

Hello,

As far as I understand, the current hide/forbid feature of Modules allows to:

  • Hide/forbid a given module for all users (with soft and hard options)
  • Prevent the hide/forbid mechanism for given UNIX user/group with the --not-user/--not-group options

Let's consider the following situation:

  1. By default all users (user1, user2, ..., user1000) have visibility/access to all modules (module1, module2, ..., module999)
  2. A new module (module1000) is added
  3. I want to restrict visbility/access to the new module1000 for user1000 only, how can I do it neatly?

My first thougths:

  • The module-hide module1000 command will hide module1000 for all users, it is not what we want.
  • By using --not-user I will have a very long file containing:
module-hide --not-user user1 module1000
module-hide --not-user user2 module1000
...
module-hide --not-user user999 module1000

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,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions