Files
wekan/docs/Features/Admin-Panel/Problems/Offices.md
T
Lauri Ojansivu c66af0e134 Docs: Admin Panel / Problems (Files to Performance): what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
File status, Filesystem integrity, Impersonation Report, Instrumentation,
Large boards, Login problems, Migrations, Offices, Password length and
Performance now each say what the feature is, where to read more, how to use
it, how its numbers are calculated, how it is implemented, and link the
commits that built it.

Corrected from the code: the file status scan limits are 100,000 records per
collection and 250,000 versions, not 20,000; the snap's FerretDB default is
OpLog with polling as the fallback, not polling only; the Password length
table has 25 rows a page.

Thanks to xet7 !
2026-11-22 17:59:12 +02:00

4.8 KiB

Admin Panel / Problems / Offices

What it is

Successful login counts by person and address. Each person's addresses stay together, so an administrator can see where each account signs in from, and which addresses several accounts share. A shared address may represent an office, VPN or NAT; it is not proof that accounts are one person. WeKan does not block addresses for this reason: blocking one shared address would lock out everybody behind it.

Read more

How to use it

  1. Sign in as a site administrator and open Admin Panel → Problems → Offices (/admin/problems/office).
  2. Read one person at a time, with a row per address: IPv4, IPv6, first and last login times, the number of logins and location information when available.
  3. Type a username, full name, address or location in the search box and press Enter to find people.
  4. Use the previous/next page buttons for more people.

How the numbers are calculated

From models/lib/loginTally.js and server/methods/loginOffices.js:

  • Logins - each successful login adds 1 to the account's count for that address and to the address's count for that account, and sets the last login time; the first login time is set once.
  • Per account, at most 50 addresses are listed (MAX_ADDRESSES_PER_USER), and per address at most 200 accounts (MAX_USERS_PER_ADDRESS); the rest are counted as an overflow ("more addresses") rather than listed.
  • Shared address - one that at least 3 different accounts have logged in from (SHARED_ADDRESS_MIN_USERS).
  • An IPv4 address written as IPv6 (::ffff:203.0.113.9) is counted as the IPv4 address it is.
  • Addresses are sorted by count, most first.
  • Paging - 25 people a page (OFFICES_PER_PAGE in client/components/settings/adminProblems.js); the server accepts 1 to 200, sorted by username.

How it works in WeKan

  • Every successful login is folded into the account's loginAddresses tally and into the LoginAddresses collection (models/loginAddresses.js) by server/loginTallyOnLogin.js and server/lib/loginTally.js. The tally keys are short SHA-256 hashes, because an address or a username cannot be a Mongo field name.
  • The loginOffices method returns the people first, with all of each person's addresses kept together; loginOffice(address) returns one address in full. Both refuse anybody who is not isAdmin.
  • Location information comes from the configured trusted proxy/CDN headers (models/lib/geoHeaders.js). Missing information remains unknown. An IPv4/IPv6 pair is only shown when the server has evidence linking the addresses; an address alone cannot establish someone's precise physical location.
  • This is an administrator report of locally recorded login activity. Its implementation does not require sending login addresses to an external geolocation service.
  • Tests: tests/officesGroupedByPerson.test.cjs and tests/playwright/specs/admin-office-location.e2e.js.

Commits