Fix integration settings throwing 500 error
Fix integration settings throwing 500 error
I couldn't find other usage of nodeify
and policy
Fix https://gitlab.com/gitlab-org/gitter/webapp/issues/2188
When you visit
https://gitter.im/settings/integrations/<community>/<room>
by using the Room settings dropdown -> Integrations, the following 500 error is thrown
- https://sentry.gitlab.net/gitlab/gitter-backend/issues/819726/
- https://sentry.gitlab.net/gitlab/gitter-backend-staging/issues/820385/
TypeError: policy.canAdmin(...).then(...).nodeify is not a function File "/opt/gitter/gitter-webapp/server/handlers/settings.js", line 160, in adminAccessCheck .nodeify(next); File "/opt/gitter/gitter-webapp/server/handlers/uri-context/uri-context-resolver-middleware.js", line 34, in null.<anonymous> next(); ... (14 additional frame(s) were not displayed) TypeError: policy.canAdmin(...).then(...).nodeify is not a function
This was caused by the change to the policies and policy evaluation from https://dev.gitlab.org/gitlab/gitter/webapp/merge_requests/7 to fix https://gitlab.com/gitlab-org/gitter/webapp/issues/2041
- Rolled out in Gitter 19.50.1 today(2019-6-25).
- First seen when that release went out and the changes in that MR are very relevant to the error
Specifically where we removed the Bluebird promises
Edited by Eric Eastwood