{"record":{"id":"242261271ee319b1","repo":"m1k1o/neko","slug":"session-logins-locked","errorCode":null,"errorMessage":"session logins locked","messagePattern":"session logins locked","errorType":"error_code","errorClass":"ErrSessionLoginsLocked","httpStatus":null,"severity":"info","filePath":"server/pkg/types/session.go","lineNumber":14,"sourceCode":"package types\n\nimport (\n\t\"errors\"\n\t\"net/http\"\n\t\"time\"\n)\n\nvar (\n\tErrSessionNotFound         = errors.New(\"session not found\")\n\tErrSessionAlreadyExists    = errors.New(\"session already exists\")\n\tErrSessionAlreadyConnected = errors.New(\"session is already connected\")\n\tErrSessionLoginDisabled    = errors.New(\"session login disabled\")\n\tErrSessionLoginsLocked     = errors.New(\"session logins locked\")\n)\n\ntype Cursor struct {\n\tX int `json:\"x\"`\n\tY int `json:\"y\"`\n}\n\ntype SessionProfile struct {\n\tId      string\n\tToken   string\n\tProfile MemberProfile\n}\n\ntype SessionState struct {\n\tIsConnected bool `json:\"is_connected\"`\n\t// when the session was last connected\n\tConnectedSince *time.Time `json:\"connected_since,omitempty\"`\n\t// when the session was last not connected","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/m1k1o/neko/blob/b0f01cedea68893e85a3fd852c0521238c285695/server/pkg/types/session.go#L1-L32","documentation":"ErrSessionLoginsLocked is a sentinel error in the neko types package returned by Login when the server-wide Settings.LockedLogins flag is enabled. All new logins are locked (an admin control), so authentication is refused regardless of valid credentials.","triggerScenarios":"Login called while sessions.Settings().LockedLogins is true — e.g. an admin locked the room to freeze current connections or during maintenance/incident response.","commonSituations":"Admins locking a shared remote-desktop room during a session and forgetting to unlock; scripted automation attempting logins against a locked room; after a security incident where logins were locked intentionally.","solutions":["Have an admin toggle LockedLogins=false via the control/settings API, then retry login.","Wait until the room owner unlocks logins.","If locked unintentionally, review who/what enabled the flag (admin API calls, plugins) and adjust.","Update automation/runbooks to check Settings().LockedLogins before attempting login."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// check lock state before attempting login\nif sessions.Settings().LockedLogins {\n    return errors.New(\"logins are currently locked by an admin\")\n}","typeGuard":null,"tryCatchPattern":"_, _, err := manager.Login(username, password)\nif errors.Is(err, types.ErrSessionLoginsLocked) {\n    // show 'room locked' UI and poll until unlocked\n    return\n}\nreturn err","preventionTips":["Check Settings().LockedLogins in automation before logins.","Unlock the room after admin operations complete.","Monitor settings changes via OnSettingsChanged listeners.","Document the lock control for room owners."],"tags":["auth","session","locked","admin","go"],"backgroundTag":"logins-locked","analyzedSha":"b0f01cedea68893e85a3fd852c0521238c285695","analyzedAt":"2026-09-01T10:35:56.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}