Commit Graph

59 Commits

Author SHA1 Message Date
Girish Ramakrishnan
ea430b255b make the tests work 2021-06-29 11:01:46 -07:00
Girish Ramakrishnan
31498afe39 async'ify the groups code 2021-06-29 09:08:45 -07:00
Girish Ramakrishnan
246956fd0e groupMembers: add unique constraint
fixes #696
2020-12-22 16:18:15 -08:00
Johannes Zellner
e7029c0afd Remove unsused and poorly named groups.getGroups() API 2020-06-05 09:24:00 +02:00
Johannes Zellner
42cbcc6ce3 groups.create() now needs source argument 2020-06-04 14:20:05 +02:00
Johannes Zellner
c5e84d5469 Add source property to userGroups 2020-06-04 13:25:55 +02:00
Johannes Zellner
07b95c2c4b Add groups.getByName() 2020-06-04 12:48:35 +02:00
Girish Ramakrishnan
a017af41c5 Start moving db code to use BoxError as well 2019-10-24 14:09:53 -07:00
Girish Ramakrishnan
2d115d3d0f Move GroupsError to BoxError 2019-10-22 16:34:17 -07:00
Girish Ramakrishnan
1b594d3e50 Remove unused GroupsError 2019-10-22 16:26:38 -07:00
Johannes Zellner
ce406c7088 Add groupCount to backendSettings 2019-07-03 13:47:23 +02:00
Girish Ramakrishnan
78a2176d1d Make admin simply a boolean instead of group
This simplifies a lot of logic. Keeping an admin group has no benefit
2018-07-26 22:29:57 -07:00
Girish Ramakrishnan
b4d5def56d Revert role support 2018-07-26 13:23:06 -07:00
Girish Ramakrishnan
74b1df17c0 Fix groups test and route to make name optional 2018-06-20 09:31:50 -07:00
Girish Ramakrishnan
5d13cc363f Allow group name to be changed 2018-06-18 18:30:40 -07:00
Girish Ramakrishnan
6cd0601629 Map group roles to scopes 2018-06-18 14:52:39 -07:00
Girish Ramakrishnan
b5c8e7a52a Rename to getGroups 2018-06-18 14:10:29 -07:00
Girish Ramakrishnan
7f3114e67d Rename to get/setMembership (to indicate IDs and not group objects 2018-06-18 13:57:17 -07:00
Girish Ramakrishnan
1dbcf2a46a Rename to groups.update 2018-06-18 13:41:27 -07:00
Girish Ramakrishnan
ca9cd2cf0f Add groups.getRoles 2018-06-16 00:29:56 -07:00
Girish Ramakrishnan
02d5d2f808 Add API to add and update the group roles 2018-06-15 00:28:27 -07:00
Girish Ramakrishnan
a77d45f5de 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.
2018-06-14 22:54:52 -07:00
Girish Ramakrishnan
5e09f3dcb2 Group names can contain - and end with .app
now that we have decoupled it from mailbox names, this restriction
can be removed
2018-06-14 22:22:09 -07:00
Girish Ramakrishnan
7bb8d059b5 GroupError -> GroupsError 2018-04-29 11:21:01 -07:00
Girish Ramakrishnan
467bfa2859 remove mailboxdb from groups code 2018-04-04 20:08:52 -07:00
Johannes Zellner
40f73f6c4b Cleanup the mailboxes for groups on deletion 2018-01-26 11:40:28 +01:00
Girish Ramakrishnan
0bd0857189 Update many modules
npm WARN deprecated ejs-cli@1.2.0: This has breaking change. (in ejs package) use <= 2.0.0.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
2017-08-13 17:57:48 -07:00
Girish Ramakrishnan
d444d8552e add/del group mailbox as part of transaction 2017-02-14 09:54:52 -08:00
Girish Ramakrishnan
7efb6d60bc Allow usernames and groupnames of length 1
Fixes #204
2017-02-02 01:02:51 -08:00
Girish Ramakrishnan
2c357e022b add note about ldap restrictions as well 2016-10-01 23:52:01 -07:00
Girish Ramakrishnan
cd0243d700 always store the group names as lower case 2016-09-30 12:33:18 -07:00
Girish Ramakrishnan
ba588a1cd7 Fix group name validation to not allow hyphen
Fixes #70
2016-09-30 12:28:29 -07:00
Girish Ramakrishnan
475fd06ac0 use unique ids for groups 2016-09-30 09:33:10 -07:00
Girish Ramakrishnan
8e712da2c8 Add route and API to set members of a group 2016-09-29 14:48:14 -07:00
Girish Ramakrishnan
1d31975e2a Groupname can be 2 chars long 2016-09-28 10:11:43 -07:00
Girish Ramakrishnan
3fc17d38a5 Merge reserved groups and usernames into one list
This is because now the mailbox names are shared
2016-09-27 07:48:44 -07:00
Girish Ramakrishnan
00ee2eea39 Remove code to push aliases
The mail-addon will query via LDAP
2016-09-23 15:14:07 -07:00
Girish Ramakrishnan
503a1d7229 reserve .app namespace for apps 2016-09-21 11:55:53 -07:00
Girish Ramakrishnan
9a000ddaf0 make ADMIN_GROUP_ID a constant 2016-09-20 15:07:11 -07:00
Girish Ramakrishnan
c39c1b9b51 remove jshint 2016-09-15 23:15:06 -07:00
Girish Ramakrishnan
13a1213b0d make group listing API return member userIds 2016-06-02 21:07:33 -07:00
Girish Ramakrishnan
82cd215ffa merge bad fields and pass error.message correctly in REST responses 2016-06-02 00:12:21 -07:00
Johannes Zellner
c585be4eec Adjust group length error message 2016-02-26 11:07:31 +01:00
Johannes Zellner
754e33af2a do not allow removing the admin group 2016-02-13 12:42:41 +01:00
Johannes Zellner
fbeefeca7d setGroups() has no result 2016-02-11 11:26:35 +01:00
Girish Ramakrishnan
f413bfb3a0 Add route to set the users groups 2016-02-09 16:43:32 -08:00
Girish Ramakrishnan
82cf667f3b Add groups route tests 2016-02-09 15:26:46 -08:00
girish@cloudron.io
0b814af206 Add api to get groups 2016-02-09 13:33:30 -08:00
girish@cloudron.io
3649fd0c31 drop the gid: prefix for group id
like the username, id and name is same in groups.
2016-02-09 12:28:50 -08:00
girish@cloudron.io
4569b67007 make users and admins groups as reserved 2016-02-09 12:16:30 -08:00