Groups table renamed from groups
to ldapgroups
This commit is contained in:
parent
567aa5c12d
commit
b234344036
|
@ -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);
|
||||
```
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user