mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
21 lines
559 B
JavaScript
21 lines
559 B
JavaScript
import { Meteor } from 'meteor/meteor';
|
|
import { check } from 'meteor/check';
|
|
import { lockoutPageForAdmin, unlockAllUsersForAdmin,
|
|
unlockUserForAdmin } from '/server/lib/adminLockout';
|
|
|
|
// Method to find locked users and release them if needed
|
|
Meteor.methods({
|
|
async getLockedUsers() {
|
|
return (await lockoutPageForAdmin(this.userId)).lockedUsers;
|
|
},
|
|
|
|
async unlockUser(userId) {
|
|
check(userId, String);
|
|
return unlockUserForAdmin(this.userId, userId);
|
|
},
|
|
|
|
async unlockAllUsers() {
|
|
return unlockAllUsersForAdmin(this.userId);
|
|
}
|
|
});
|