Add rolesJson to groups table

This will contain the roles ('role definition') of a group of
users. We will internally map these to our API scopes.
This commit is contained in:
Girish Ramakrishnan
2018-06-14 21:12:52 -07:00
parent 5e09f3dcb2
commit a77d45f5de
15 changed files with 135 additions and 36 deletions

View File

@@ -1452,7 +1452,7 @@ describe('database', function () {
async.series([
database.initialize,
database._clear,
groupdb.add.bind(null, constants.ADMIN_GROUP_ID, constants.ADMIN_GROUP_NAME),
groupdb.add.bind(null, constants.ADMIN_GROUP_ID, constants.ADMIN_GROUP_NAME, [ /* roles */]),
userdb.add.bind(null, USER_0.id, USER_0),
userdb.add.bind(null, USER_1.id, USER_1),
userdb.add.bind(null, USER_2.id, USER_2)
@@ -1462,7 +1462,7 @@ describe('database', function () {
var GROUP_ID_1 = 'foundersid';
it('can create a group', function (done) {
groupdb.add(GROUP_ID_1, 'founders', function (error) {
groupdb.add(GROUP_ID_1, 'founders', [ /* roles */ ], function (error) {
expect(error).to.be(null);
done();
});