Remove unused invite and SSH-key user features

Both were dead/incomplete: POST /api/user/key called a nonexistent
User.addSSHkey, and the invite flow (POST /api/user/invite, User.invite,
User.addByInvite, InviteToken) had no consumer or UI. Drop the routes, the
InviteToken model, and the per-backing invite methods.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 11:57:29 -04:00
parent 3e5590288a
commit 42a00dd3bf
4 changed files with 5 additions and 103 deletions
+1 -12
View File
@@ -1,7 +1,7 @@
'use strict';
const { Client, Attribute, Change } = require('ldapts');
const {Token, InviteToken} = require('./token');
const {Token} = require('./token');
const conf = require('@simpleworkjs/conf').ldap;
const client = new Client({
@@ -141,17 +141,6 @@ User.exists = async function(data){
}
};
User.invite = async function(){
try{
let token = await InviteToken.add({created_by: this.username});
return token;
}catch(error){
throw error;
}
};
User.login = async function(data){
try{
let user = await this.get(data.username);