#132 fine-grained permissions
This commit is contained in:
parent
257db4099e
commit
0236f648d9
|
@ -0,0 +1,7 @@
|
||||||
|
-- Up
|
||||||
|
|
||||||
|
UPDATE users SET roles = '' WHERE roles = 'user';
|
||||||
|
|
||||||
|
-- Down
|
||||||
|
|
||||||
|
UPDATE users SET roles = 'user' WHERE roles = '';
|
|
@ -72,7 +72,7 @@ const fetchOrCreateUser = async (db, user, avatarSource = 'gravatar') => {
|
||||||
id: ulid(),
|
id: ulid(),
|
||||||
username: await defaultUsername(db, user.name || user.email),
|
username: await defaultUsername(db, user.name || user.email),
|
||||||
email: normalise(user.email),
|
email: normalise(user.email),
|
||||||
roles: 'user',
|
roles: '',
|
||||||
avatarSource: avatarSource,
|
avatarSource: avatarSource,
|
||||||
}
|
}
|
||||||
await db.get(SQL`INSERT INTO users(id, username, email, roles, avatarSource)
|
await db.get(SQL`INSERT INTO users(id, username, email, roles, avatarSource)
|
||||||
|
|
Reference in New Issue