@ -162,6 +162,56 @@ async function routes(app: FastifyInstance) {
}
)
/**
*RECENTLOGINS
*/
app.get<{Querystring:{limit?: number}}>(
'/recent-logins',
{
config:{
// -> `access:admin`, not `read:users`: this answers a panel on the admin dashboard, which
// everyone who can open the admin area sees, and it is the same permission `system/info`
// fills the rest of that dashboard with. It is why the answer is identity plus a timestamp
// and nothing else -- the user list, and every account flag on it, still needs `read:users`.
permissions:['access:admin']
},
schema:{
summary:'List the most recent logins',
description:
'Who signed in last, most recent first. Accounts that have never logged in are left out rather than trailing the list, as are system accounts — nothing signs in as the guest.',
"admin.dashboard.contributeSubtitle":"Wiki.js is a free and open source project. There are several ways you can contribute to the project.",
"admin.dashboard.groups":"Groups",
"admin.dashboard.lastLogins":"Last Logins",
"admin.dashboard.lastLoginsNone":"No logins recorded yet.",
"admin.dashboard.mostPopularPages":"Most Popular Pages",
"admin.dashboard.pages":"Pages",
"admin.dashboard.recentPages":"Recent Pages",
@ -782,6 +784,7 @@
"admin.security.warn":"Make sure to understand the implications before turning on / off a security feature.",
"admin.sites.activate":"Activate Site",
"admin.sites.activateConfirm":"Are you sure you want activate site {siteTitle}? The site will become accessible to users with read access.",
"admin.sites.createInvalidData":"Some fields are missing or have invalid data.",
"admin.sites.createSuccess":"Site created successfully.",
"admin.sites.deactivate":"Deactivate Site",
"admin.sites.deactivateConfirm":"Are you sure you want deactivate site {siteTitle}? The site will no longer be accessible to users.",
@ -792,7 +795,11 @@
"admin.sites.edit":"Edit Site",
"admin.sites.hostname":"Hostname",
"admin.sites.hostnameHint":"Must be a fully-qualified domain name (e.g. wiki.example.com) or * for a catch-all site. Note that there can only be 1 catch-all site.",
"admin.sites.hostnameInvalidChars":"Hostname has invalid characters.",
"admin.sites.hostnameMissing":"Hostname is missing.",
"admin.sites.isActive":"Active",
"admin.sites.nameInvalidChars":"Site name has invalid characters.",
"admin.sites.nameMissing":"Site name is missing.",
"admin.sites.new":"New Site",
"admin.sites.refreshSuccess":"List of sites refreshed successfully.",