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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user