mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Revert users changes that were made at Wekan v4.16.
Thanks to xet7 !
This commit is contained in:
parent
0ff1e63a5d
commit
5eb3784527
11 changed files with 26 additions and 26 deletions
|
|
@ -175,7 +175,7 @@ if (isSandstorm && Meteor.isServer) {
|
|||
const users = {};
|
||||
function ensureUserListed(userId) {
|
||||
if (!users[userId]) {
|
||||
const user = Users.findOne(userId);
|
||||
const user = Meteor.users.findOne(userId);
|
||||
if (user) {
|
||||
users[userId] = { id: user.services.sandstorm.id };
|
||||
} else {
|
||||
|
|
@ -217,7 +217,7 @@ if (isSandstorm && Meteor.isServer) {
|
|||
'userId',
|
||||
);
|
||||
(comment.text.match(/\B@([\w.]*)/g) || []).forEach(username => {
|
||||
const user = Users.findOne({
|
||||
const user = Meteor.users.findOne({
|
||||
username: username.slice(1),
|
||||
});
|
||||
if (user && activeMembers.indexOf(user._id) !== -1) {
|
||||
|
|
@ -368,7 +368,7 @@ if (isSandstorm && Meteor.isServer) {
|
|||
if (newMethods[key].auth) {
|
||||
newMethods[key].auth = function() {
|
||||
const sandstormID = this.req.headers['x-sandstorm-user-id'];
|
||||
const user = Users.findOne({
|
||||
const user = Meteor.users.findOne({
|
||||
'services.sandstorm.id': sandstormID,
|
||||
});
|
||||
return user && user._id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue