- aggiornamento con proj RISO. postcss, pwa.
This commit is contained in:
@@ -731,7 +731,7 @@ UserSchema.statics.isFacilitatore = function (perm) {
|
||||
}
|
||||
};
|
||||
|
||||
UserSchema.statics.findByToken = async function (token, typeaccess, con_auth) {
|
||||
UserSchema.statics.findByToken = async function (token, typeaccess, con_auth, idapp) {
|
||||
const User = this;
|
||||
let decoded;
|
||||
let code = server_constants.RIS_CODE_HTTP_INVALID_TOKEN;
|
||||
@@ -758,10 +758,15 @@ UserSchema.statics.findByToken = async function (token, typeaccess, con_auth) {
|
||||
}
|
||||
|
||||
if (code === server_constants.RIS_CODE_OK) {
|
||||
|
||||
user = await User.findOne({
|
||||
'_id': decoded.smart,
|
||||
'tokens.token': token,
|
||||
'tokens.access': typeaccess,
|
||||
tokens: {
|
||||
$elemMatch: {
|
||||
token: token,
|
||||
access: typeaccess,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
if (user) {
|
||||
|
||||
Reference in New Issue
Block a user