@opengis/admin 0.1.71 → 0.1.72
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -35,8 +35,8 @@ export default async function adminMenu({ user = {}, session, pg }) {
|
|
35
35
|
const menus = isProduction && menuCache.length ? menuCache : await readMenu();
|
36
36
|
|
37
37
|
// update user access
|
38
|
-
if (session) {
|
39
|
-
const { type } = await pg.query('select user_type as type from admin.users where uid=$1', [user.uid]).then(el => el.rows[0])
|
38
|
+
if (session && user.uid) {
|
39
|
+
const { type } = await pg.query('select user_type as type from admin.users where uid=$1', [user.uid]).then(el => el.rows[0] || {})
|
40
40
|
// todo update group_list
|
41
41
|
Object.assign(user, { type });
|
42
42
|
session?.set?.('passport', { user });
|