Commit Graph

556 Commits

Author SHA1 Message Date
Girish Ramakrishnan 240ee5f563 Ensure we hand out max user.scope
The token.scope was valid at token creation time. The user's scope
could since have changed (maybe we got kicked out of a group).
2018-04-30 22:51:57 -07:00
Girish Ramakrishnan bc4f9cf596 Remove redundant requireAdmin
We already hand out scopes based on the user's access control
2018-04-30 21:38:48 -07:00
Girish Ramakrishnan f809e359c9 refactor the global variables as functions 2018-04-29 20:17:45 -07:00
Girish Ramakrishnan 91e846d976 Add SCOPE_DOMAINS 2018-04-29 18:11:33 -07:00
Girish Ramakrishnan 3b7bcc1f61 refactor scopes into accesscontrol.js
this will be our authorization layer for oauth and non-oauth tokens.
2018-04-29 17:50:07 -07:00
Girish Ramakrishnan cc113d0bb5 Add SCOPE_CLIENTS for oauth clients API 2018-04-29 17:03:10 -07:00
Girish Ramakrishnan 3e22d513eb Add SCOPE_MAIL for mail APIs 2018-04-29 17:01:12 -07:00
Girish Ramakrishnan 4fd58fb46b Rename user.js to users.js 2018-04-29 11:19:04 -07:00
Girish Ramakrishnan 82207c3ccd Keep naming consistent with delToken 2018-04-28 21:55:57 -07:00
Girish Ramakrishnan a7bb5d6b5c add route to query apps specific to user
it's not nice to overload a route to mean different things depending
on who queries it.
2018-04-26 20:07:12 -07:00
Girish Ramakrishnan e0da6679e9 Move user routes to /api/v1/user 2018-04-26 19:57:44 -07:00
Girish Ramakrishnan 561d2d9f8b admin column is no more in users table 2018-04-26 19:55:26 -07:00
Johannes Zellner 6574b22cf6 Add 2fa routest and business logic 2018-04-26 08:46:35 +02:00
Girish Ramakrishnan d1ed2aa2ce remove untested route set_admin 2018-04-25 21:43:21 -07:00
Girish Ramakrishnan 5af657ee22 rename mail crud functions 2018-04-03 15:06:14 -07:00
Girish Ramakrishnan f8a731f63a Add routes to change the mailbox and list owner 2018-04-03 14:12:43 -07:00
Girish Ramakrishnan a1f4a4d614 mail: make mailbox API based on mailbox name
this decouples mail API from users
2018-04-03 13:59:03 -07:00
Girish Ramakrishnan 696e864459 mail: make list API based on list name
this decouples mail API from groups
2018-04-03 12:06:22 -07:00
Johannes Zellner df9a191434 Add rest api to list all aliases for a given domain 2018-04-01 18:23:54 +02:00
Girish Ramakrishnan 82a593e82a Forward stats calls to mail container 2018-03-23 10:52:07 -07:00
Girish Ramakrishnan 6bc5add023 Add a way to re-sync mail DNS records
Also, make restore resync the admin domain record which gets messed
up by the dns setup
2018-03-08 17:59:53 -08:00
Girish Ramakrishnan 6da7a7d2f4 clear the request timeout when adding/updating domain
DO API takes very long to respond at times :/ Currently, there is
no easy way to reset the timeout middleware timeout. We should add
this feature upstream (https://github.com/expressjs/timeout/issues/26)
2018-03-08 09:27:56 -08:00
Johannes Zellner 11d740682e Split box and app autoupdate pattern settings 2018-02-06 19:25:03 +01:00
Johannes Zellner 79f2709f3a Ensure certificates and nginx configs on startup 2018-01-30 16:55:13 +01:00
Girish Ramakrishnan 2c60c4eb82 move all setup logic to setup.js 2018-01-29 15:51:36 -08:00
Girish Ramakrishnan c2d348fe72 remove unused /api/v1/settings/admin_certificate 2018-01-26 20:49:48 -08:00
Johannes Zellner d95a670dd7 Add mailing lists routes and logic 2018-01-26 11:25:45 +01:00
Girish Ramakrishnan 67eb7a290f Fix mail domain route 2018-01-25 13:40:02 -08:00
Johannes Zellner aab175ea05 Remove alias handling from user logic to mail logic 2018-01-25 18:03:26 +01:00
Johannes Zellner 7bba63d911 rename mailbox routes to match overall scheme of plurals 2018-01-25 12:27:28 +01:00
Girish Ramakrishnan b71c0bde55 add routes to create and delete mail domain 2018-01-25 12:09:30 +01:00
Johannes Zellner 358048e02b Add domain specific mailbox routes and logic 2018-01-24 13:11:35 +01:00
Girish Ramakrishnan d33e35fda2 Move send_test_mail under mail domain api 2018-01-23 16:10:23 -08:00
Girish Ramakrishnan 00c1c42b58 Fix mail route tests 2018-01-21 00:59:20 -08:00
Girish Ramakrishnan 16ac205c7f make mail routes domain based 2018-01-20 23:47:12 -08:00
Girish Ramakrishnan 3ed794e486 Add a single getter for all mail settings 2018-01-20 23:47:12 -08:00
Girish Ramakrishnan a7de17a160 Move mail related settings to new mail route
there is quite a bit of circular dep between settings, platform and
mail code. this will be removed in future commits.
2018-01-20 20:02:01 -08:00
Girish Ramakrishnan e724913b6c Move email_status into mail route 2018-01-20 18:37:15 -08:00
Girish Ramakrishnan ac4f12447b add set admin button 2018-01-02 16:25:30 -08:00
Girish Ramakrishnan 7d0cf1a754 caas: migrate -> change_plan 2017-12-09 09:00:10 +05:30
Girish Ramakrishnan 6dec02e1bd caas: refactor migrate and upgrade route 2017-12-09 08:43:59 +05:30
Girish Ramakrishnan 725cf297ab Developer scope is obsolete 2017-12-07 04:33:49 +05:30
Johannes Zellner 1466104681 Remove obsolete developer mode 2017-11-24 01:31:15 +01:00
Girish Ramakrishnan ac94a0b7f2 Add route to restore box from backup
Part of #439
2017-11-22 23:08:59 -08:00
Johannes Zellner 59ae1ac012 Move fallback certificate api to domains 2017-11-20 19:59:40 +01:00
Johannes Zellner 4cf2978088 Remove dns related settings api
This is replaced with the multi domain aware api
2017-11-20 19:59:40 +01:00
Johannes Zellner ca3b6e542a Require password for domain deletion route 2017-11-20 19:59:40 +01:00
Johannes Zellner 9dba816711 Add domain routes 2017-11-20 19:59:26 +01:00
Girish Ramakrishnan 06f8aa8f29 Remove dead code
getNonApprovedCode code flow is ununsed (and broken by design on
the appstore side).
2017-11-02 10:36:30 -07:00
Girish Ramakrishnan 36534f6bb2 Fix indent 2017-10-31 12:12:02 -07:00