Skip to content

Commit 688c69d

Browse files
committed
doc: clarify --user/--not-user & --group/--not-group combination
Clarifies that --user prevails over --not-user if same user name is set on both options. Same for --group/--not-group. Thanks to Robert McLay for reporting this unclear area of the documentation. Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 40c8958 commit 688c69d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

doc/source/modulefile.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,10 @@ the *modulefile* is being loaded.
591591
username specified. Following the same approach, if ``--group`` option is
592592
set, forbidding is applied only if current user is member of one of the
593593
groups specified. When both options are set, forbidding is applied if a match
594-
is found for ``--user`` or ``--group``. These two options prevail over
595-
``--not-user`` and ``--not-group`` options.
594+
is found for ``--user`` or ``--group``. If the same user name is set on both
595+
``--user`` and ``--not-user`` options, ``--user`` prevails over
596+
``--not-user``. If the same group name is set on both ``--group`` and
597+
``--not-group``, ``--group`` prevails over ``--not-group``.
596598

597599
Error message returned when trying to evaluate a forbidden module can be
598600
supplemented with the *text message* set through ``--message`` option.
@@ -686,8 +688,10 @@ the *modulefile* is being loaded.
686688
specified. Following the same approach, if ``--group`` option is set, hiding
687689
is applied only if current user is member of one of the groups specified.
688690
When both options are set, hiding is applied if a match is found for
689-
``--user`` or ``--group``. These two options prevail over ``--not-user`` and
690-
``--not-group`` options.
691+
``--user`` or ``--group``. If the same user name is set on both ``--user``
692+
and ``--not-user`` options, ``--user`` prevails over ``--not-user``. If the
693+
same group name is set on both ``--group`` and ``--not-group``, ``--group``
694+
prevails over ``--not-group``.
691695

692696
If the :option:`--all` option is set on :subcmd:`avail`, :subcmd:`aliases`,
693697
:subcmd:`whatis` or :subcmd:`search` sub-commands, hiding is disabled thus
@@ -924,8 +928,10 @@ the *modulefile* is being loaded.
924928
specified. Following the same approach, if ``--group`` option is set, the tag
925929
is applied only if current user is member of one of the groups specified.
926930
When both options are set, the tag is applied if a match is found for
927-
``--user`` or ``--group``. These two options prevail over ``--not-user`` and
928-
``--not-group`` options.
931+
``--user`` or ``--group``. If the same user name is set on both ``--user``
932+
and ``--not-user`` options, ``--user`` prevails over ``--not-user``. If the
933+
same group name is set on both ``--group`` and ``--not-group``, ``--group``
934+
prevails over ``--not-group``.
929935

930936
The parameter *modulefile* may also be a symbolic modulefile name or a
931937
modulefile alias. It may also leverage a specific syntax to finely select

0 commit comments

Comments
 (0)