aloux-iam 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/controllers/user.js +1 -6
- package/lib/services/auth.js +1 -0
- package/package.json +1 -1
package/lib/controllers/user.js
CHANGED
|
@@ -284,8 +284,7 @@ self.getMe = async (req, res) => {
|
|
|
284
284
|
try {
|
|
285
285
|
|
|
286
286
|
let user = await User.findOne({ _id: req.user._id }, { "tokens": 0, pwd: 0 }).populate(
|
|
287
|
-
|
|
288
|
-
{
|
|
287
|
+
{
|
|
289
288
|
path: "_functions", populate: [
|
|
290
289
|
{
|
|
291
290
|
path: "_permissions", populate: [
|
|
@@ -299,11 +298,7 @@ self.getMe = async (req, res) => {
|
|
|
299
298
|
]
|
|
300
299
|
}
|
|
301
300
|
]
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
path: "_business"
|
|
305
301
|
}
|
|
306
|
-
]
|
|
307
302
|
).lean()
|
|
308
303
|
|
|
309
304
|
// Obtener menús y funciones sin repertir y activas
|
package/lib/services/auth.js
CHANGED
|
@@ -157,6 +157,7 @@ self.getMenu = (user) => {
|
|
|
157
157
|
self.me = async (req, res) => {
|
|
158
158
|
|
|
159
159
|
let user = await User.findOne({ _id: req.user._id }, { "tokens": 0, pwd: 0 }).populate([
|
|
160
|
+
{ path: "_business" },
|
|
160
161
|
{ path: "_functions", populate: [{ path: "_permissions" }, { path: "_menus" }] },
|
|
161
162
|
]).lean()
|
|
162
163
|
|