Search now describes the two separate buttons (the shared headerSearchButton template is gone), the sidebar toggle, stepping through results and what is searched; Activity rendering names Admin Panel / Settings / Security, where the security controls moved; Chat view lists only cards with a conversation and the unread counts; Calendar gets its title and all its dates. Thanks to xet7 !
7.3 KiB
Board header / Visibility
What it is
Visibility decides who can see a board: only the people added to it (Private), every signed-in user of this WeKan (Signed-in users), or anybody with the link (Public). Editing stays with the board's members, unless the board admin also lets every signed-in user edit it. The control is the first of a board's header controls, after the fold caret, and shows the board's current setting.
Read more
- Access control on Wikipedia - deciding who may view or change something.
- Admin Panel / Settings / Appearance - where an administrator allows or forbids the open settings.
- Who sees what, Public boards and Board roles.
How to use it
The control is an icon and the board's current visibility — Private,
Signed-in users or Public. The label and the tooltip are the same
expression, {{_ currentBoard.permission}}, so they always name the current
setting. See the header for where the control sits
and when its label is hidden.
Change a board's visibility (board admin):
- Open the board.
- Click the visibility button (the lock, people or globe icon) in the header bar. The popup opens.
- Click Private, Signed-in users or Public. The current choice has a check mark.
- The popup closes and the button shows the new setting.
Let every signed-in user edit (board admin, on a Signed-in users or Public board, when the administrator allows it):
- Open the visibility popup as above.
- Tick Everyone signed in can edit below the line.
Who can change it. Every signed-in user sees the button. Only a board
admin gets the js-change-visibility class that opens the popup; for
everybody else the button is drawn is-disabled and does nothing. The popup's
choices are saved with Boards.updateAsync, which the server allows only for a
board admin.
The popup
boardChangeVisibilityPopup in client/components/boards/boardHeader.jade.
Each row has an icon, the name, a check mark on the current choice, and a
description:
| Choice | Stored permission |
Description |
|---|---|---|
Private (fa-lock) |
private |
Only people added to the board can view and edit it. |
Signed-in users (fa-users) |
instance |
Every signed-in user of this WeKan can view the board; it is never shown to people who are not signed in. Only board members can edit. |
Public (fa-globe) |
public |
Visible to anyone with the link, and can show up in search engines. Only board members can edit. |
Choosing a row calls board.setVisibility() and closes the popup.
- Signed-in users and Public are offered only while Admin Panel /
Settings / Appearance does not allow private boards only
(
tableVisibilityMode-allowPrivateOnly). With that setting on, the popup shows only Private, and a board that is already public or signed-in-users is not displayed: the board page shows thetableVisibilityMode-allowPrivateOnlytext instead. - The Private and Public descriptions can be replaced by an administrator in
Admin Panel / Settings / Appearance
(
customPrivateBoardDesc,customPublicBoardDesc). Empty uses the default text.
Everyone signed in can edit
Below a rule, the popup offers one checkbox, Everyone signed in can edit, when both are true:
- the board is Signed-in users or Public, and
- Admin Panel / Settings / Appearance allows it
(
tableVisibilityMode-allowInstanceEditing).
Ticking it toggles the board's allowsInstanceEditing. Signed-in users who
are not members can then add, edit, move and comment on cards, and become
Normal members when they do.
The same visibility list, without this checkbox, is used in the Create Board
form (createBoardForm), where it sets the new board's visibility.
How the numbers are calculated
Visibility has no numbers of its own. It has three values (private,
instance, public) and two administrator switches that limit them. Whether a
board can be read without being a member is readableWithoutMembership() in
models/lib/boardPermission.js: a
public board always, an instance board only for a signed-in user, a
private board never.
How it works in WeKan
- Templates:
boardHeaderButtons,boardVisibilityListandboardChangeVisibilityPopupin client/components/boards/boardHeader.jade; helpers and handlers (notAllowPrivateVisibilityOnly,privateDesc,publicDesc,instanceEditingOffered,notDisplayThisBoard) in client/components/boards/boardHeader.js. The administrator's texts are chosen by imports/i18n/lib/visibilityDesc.js. - Data: the board's
permissionfield andallowsInstanceEditing(models/boards.js,setVisibility()); the administrator switches are documents ofTableVisibilityModeSettings, subscribed astableVisibilityModeSettings. - Permissions: the update is allowed only for a board admin by
Boards.allowin server/permissions/boards.js. The same visibility rule is used by the publications and by the Watch method, through models/lib/boardVisibilitySelectors.js. - Tests: tests/boardVisibility.test.cjs, tests/visibilityDesc.test.cjs, tests/instanceEditing.test.cjs, tests/boardsVisibilitySettings.test.cjs and the browser spec tests/playwright/specs/instance-board-visibility.e2e.js.
Related
Commits
- The Private and Public descriptions are shown again
- Boards every signed-in user may edit
- Board imports honour private boards only
- Semi-open boards, visible to every signed-in user
- Private boards only is enforced in every server method that creates a board
- The visibility button shows its name
- Fix a board stuck on Private, and the Public Board menus
- An Admin Panel setting to allow private boards only