diff --git a/README.md b/README.md index 594dd89..ab27a07 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,9 @@ CREATE TABLE users ( yubikey TEXT DEFAULT '', custattr TEXT DEFAULT '{}'); -INSERT INTO groups(name, gidnumber) VALUES('users', 0); -INSERT INTO groups(name, gidnumber) VALUES('admins', 10); -INSERT INTO groups(name, gidnumber) VALUES('root', 100); +INSERT INTO ldapgroups(name, gidnumber) VALUES('users', 0); +INSERT INTO ldapgroups(name, gidnumber) VALUES('admins', 10); +INSERT INTO ldapgroups(name, gidnumber) VALUES('root', 100); INSERT INTO includegroups(parentgroupid, includegroupid) VALUES(10, 0); ``` diff --git a/routes/auth.js b/routes/auth.js index d85d8a4..54f38d8 100644 --- a/routes/auth.js +++ b/routes/auth.js @@ -83,7 +83,7 @@ AUTH.post('/login', async (req, res) => { const bearer = { name: user.name, id: user.uidnumber, - group: (await glauth.query("SELECT name FROM groups WHERE gidnumber = $1::int", [ user.primarygroup ])).rows[0].name + group: (await glauth.query("SELECT name FROM ldapgroups WHERE gidnumber = $1::int", [ user.primarygroup ])).rows[0].name } const token = jwt.sign(