expressa 2.0.16 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/screenshots/users.js/User Management -- Can log in as non-admin, but cannot create users (failed).png +0 -0
- package/doc/development.md +1 -1
- package/modules/admin/.babelrc +15 -7
- package/modules/admin/build/webpack.base.conf.js +28 -24
- package/modules/admin/build/webpack.prod.conf.js +0 -59
- package/modules/admin/dist/164c6167c1f3c497c07c.woff +1 -0
- package/modules/admin/dist/42ac07abc8473600c41f.ttf +1 -0
- package/modules/admin/dist/86dccb18a7eb4be8ef1a.woff +1 -0
- package/modules/admin/dist/c45297c558e0318fc9c5.ttf +1 -0
- package/modules/admin/dist/c717c9930715e24fa12c.woff +1 -0
- package/modules/admin/dist/ca6f07ef23f24cc2738a.ttf +1 -0
- package/modules/admin/dist/css/269.f7d5c7d5.css +37 -0
- package/modules/admin/dist/css/269.f7d5c7d5.css.gz +0 -0
- package/modules/admin/dist/css/451.c6646d20.css +1 -0
- package/modules/admin/dist/css/451.c6646d20.css.gz +0 -0
- package/modules/admin/dist/css/572.74d8e965.css +34 -0
- package/modules/admin/dist/css/572.74d8e965.css.gz +0 -0
- package/modules/admin/dist/css/651.e946bda7.css +6 -0
- package/modules/admin/dist/css/651.e946bda7.css.gz +0 -0
- package/modules/admin/dist/css/699.d1f90954.css +8 -0
- package/modules/admin/dist/css/699.d1f90954.css.gz +0 -0
- package/modules/admin/dist/css/750.4086915d.css +2 -0
- package/modules/admin/dist/css/750.4086915d.css.gz +0 -0
- package/modules/admin/dist/css/864.506917a4.css +7 -0
- package/modules/admin/dist/css/864.506917a4.css.gz +0 -0
- package/modules/admin/dist/css/899.506917a4.css +7 -0
- package/modules/admin/dist/css/899.506917a4.css.gz +0 -0
- package/modules/admin/dist/css/950.1fd9d57c.css +7 -0
- package/modules/admin/dist/css/950.1fd9d57c.css.gz +0 -0
- package/modules/admin/dist/css/app.11cc6245.css +39 -0
- package/modules/admin/dist/css/app.11cc6245.css.gz +0 -0
- package/modules/admin/dist/css/app.2e1b0d79.css +591 -0
- package/modules/admin/dist/css/app.2e1b0d79.css.gz +0 -0
- package/modules/admin/dist/css/app.4d43d0fd.css +592 -0
- package/modules/admin/dist/css/app.4d43d0fd.css.gz +0 -0
- package/modules/admin/dist/css/app.abace109.css +1 -0
- package/modules/admin/dist/css/app.abace109.css.gz +0 -0
- package/modules/admin/dist/css/chunk-elementUI.67ad86d7.css +1 -0
- package/modules/admin/dist/css/chunk-elementUI.67ad86d7.css.gz +0 -0
- package/modules/admin/dist/css/chunk-elementUI.9e660bfd.css +1 -0
- package/modules/admin/dist/css/chunk-elementUI.9e660bfd.css.gz +0 -0
- package/modules/admin/dist/css/chunk-elementUI.c77cf142.css +1 -0
- package/modules/admin/dist/css/chunk-elementUI.c77cf142.css.gz +0 -0
- package/modules/admin/dist/css/chunk-elementUI.f1625b35.css +1 -0
- package/modules/admin/dist/css/chunk-elementUI.f1625b35.css.gz +0 -0
- package/modules/admin/dist/css/chunk-elementUI.f25dfb9b.css +1 -0
- package/modules/admin/dist/css/chunk-elementUI.f25dfb9b.css.gz +0 -0
- package/modules/admin/dist/css/chunk-libs.de0d8484.css +551 -0
- package/modules/admin/dist/css/chunk-libs.de0d8484.css.gz +0 -0
- package/modules/admin/dist/favicon.ico +0 -0
- package/modules/admin/dist/index.html +1 -0
- package/modules/admin/dist/static/fonts/element-icons.313f7da.woff +0 -0
- package/modules/admin/dist/static/fonts/element-icons.4520188.ttf +0 -0
- package/modules/admin/dist/static/img/404.4cf6930.png +0 -0
- package/modules/admin/dist/static/js/269.7245ceaf.js +1 -0
- package/modules/admin/dist/static/js/269.7245ceaf.js.gz +0 -0
- package/modules/admin/dist/static/js/451.645974a8.js +1 -0
- package/modules/admin/dist/static/js/451.645974a8.js.gz +0 -0
- package/modules/admin/dist/static/js/460.962d5bc0.js +1 -0
- package/modules/admin/dist/static/js/460.962d5bc0.js.gz +0 -0
- package/modules/admin/dist/static/js/556.1e08866a.js +1 -0
- package/modules/admin/dist/static/js/556.1e08866a.js.gz +0 -0
- package/modules/admin/dist/static/js/572.13392e1d.js +1 -0
- package/modules/admin/dist/static/js/572.13392e1d.js.gz +0 -0
- package/modules/admin/dist/static/js/603.7b34a650.js +1 -0
- package/modules/admin/dist/static/js/603.7b34a650.js.gz +0 -0
- package/modules/admin/dist/static/js/637.26413baa.js +1 -0
- package/modules/admin/dist/static/js/637.26413baa.js.gz +0 -0
- package/modules/admin/dist/static/js/651.564b24b6.js +1 -0
- package/modules/admin/dist/static/js/651.564b24b6.js.gz +0 -0
- package/modules/admin/dist/static/js/653.02ec1098.js +1 -0
- package/modules/admin/dist/static/js/653.02ec1098.js.gz +0 -0
- package/modules/admin/dist/static/js/699.c7564884.js +1 -0
- package/modules/admin/dist/static/js/699.c7564884.js.gz +0 -0
- package/modules/admin/dist/static/js/750.50c950da.js +1 -0
- package/modules/admin/dist/static/js/750.50c950da.js.gz +0 -0
- package/modules/admin/dist/static/js/864.4f43847d.js +1 -0
- package/modules/admin/dist/static/js/864.4f43847d.js.gz +0 -0
- package/modules/admin/dist/static/js/950.d4ff0a18.js +1 -0
- package/modules/admin/dist/static/js/950.d4ff0a18.js.gz +0 -0
- package/modules/admin/dist/static/js/app.981e71b3.js +2 -0
- package/modules/admin/dist/static/js/app.981e71b3.js.LICENSE.txt +123 -0
- package/modules/admin/dist/static/js/app.981e71b3.js.LICENSE.txt.gz +0 -0
- package/modules/admin/dist/static/js/app.981e71b3.js.gz +0 -0
- package/modules/admin/package.json +21 -18
- package/modules/admin/src/main.js +1 -0
- package/modules/admin/src/views/Endpoints.vue +1 -1
- package/modules/admin/src/views/layout/Layout.vue +1 -1
- package/package.json +1 -1
- package/test/collections.querying.js +0 -1
- package/test/test.js +0 -1
- package/test/testutils.js +1 -1
- package/test/users.js +11 -11
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
8
|
+
* @license MIT */
|
|
9
|
+
|
|
10
|
+
/*!
|
|
11
|
+
* Bootstrap v4.6.2 (https://getbootstrap.com/)
|
|
12
|
+
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
13
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/*!
|
|
17
|
+
* JavaScript Cookie v2.2.0
|
|
18
|
+
* https://github.com/js-cookie/js-cookie
|
|
19
|
+
*
|
|
20
|
+
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
|
21
|
+
* Released under the MIT license
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/*!
|
|
25
|
+
* Vue.js v2.5.17
|
|
26
|
+
* (c) 2014-2018 Evan You
|
|
27
|
+
* Released under the MIT License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/*!
|
|
31
|
+
* jQuery JavaScript Library v3.7.1
|
|
32
|
+
* https://jquery.com/
|
|
33
|
+
*
|
|
34
|
+
* Copyright OpenJS Foundation and other contributors
|
|
35
|
+
* Released under the MIT license
|
|
36
|
+
* https://jquery.org/license
|
|
37
|
+
*
|
|
38
|
+
* Date: 2023-08-28T13:37Z
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @license
|
|
45
|
+
* Lodash <https://lodash.com/>
|
|
46
|
+
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
|
47
|
+
* Released under MIT license <https://lodash.com/license>
|
|
48
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
49
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Checks if an event is supported in the current execution environment.
|
|
54
|
+
*
|
|
55
|
+
* NOTE: This will not work correctly for non-generic events such as `change`,
|
|
56
|
+
* `reset`, `load`, `error`, and `select`.
|
|
57
|
+
*
|
|
58
|
+
* Borrows from Modernizr.
|
|
59
|
+
*
|
|
60
|
+
* @param {string} eventNameSuffix Event name, e.g. "click".
|
|
61
|
+
* @param {?boolean} capture Check if the capture phase is supported.
|
|
62
|
+
* @return {boolean} True if the event is supported.
|
|
63
|
+
* @internal
|
|
64
|
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* vuex v3.0.1
|
|
69
|
+
* (c) 2017 Evan You
|
|
70
|
+
* @license MIT
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
/** @license React v0.19.1
|
|
74
|
+
* scheduler.production.min.js
|
|
75
|
+
*
|
|
76
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the MIT license found in the
|
|
79
|
+
* LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
/** @license React v16.14.0
|
|
83
|
+
* react-dom.production.min.js
|
|
84
|
+
*
|
|
85
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the MIT license found in the
|
|
88
|
+
* LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
/** @license React v16.14.0
|
|
92
|
+
* react.production.min.js
|
|
93
|
+
*
|
|
94
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the MIT license found in the
|
|
97
|
+
* LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
/**!
|
|
101
|
+
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
102
|
+
* @version 1.16.1
|
|
103
|
+
* @license
|
|
104
|
+
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
105
|
+
*
|
|
106
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
107
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
108
|
+
* in the Software without restriction, including without limitation the rights
|
|
109
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
110
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
111
|
+
* furnished to do so, subject to the following conditions:
|
|
112
|
+
*
|
|
113
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
114
|
+
* copies or substantial portions of the Software.
|
|
115
|
+
*
|
|
116
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
117
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
118
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
119
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
120
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
121
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
122
|
+
* SOFTWARE.
|
|
123
|
+
*/
|
|
Binary file
|
|
Binary file
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"axios": "^0.21.1",
|
|
19
19
|
"bootstrap": "^4.2.1",
|
|
20
20
|
"dot-object": "^2.1.4",
|
|
21
|
-
"element-ui": "2.
|
|
21
|
+
"element-ui": "^2.15.14",
|
|
22
22
|
"file-saver": "^2.0.2",
|
|
23
23
|
"jquery": "^3.3.1",
|
|
24
24
|
"js-cookie": "2.2.0",
|
|
@@ -37,52 +37,55 @@
|
|
|
37
37
|
"vuex": "3.0.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
+
"@babel/core": "^7.26.0",
|
|
41
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
42
|
+
"@babel/plugin-proposal-decorators": "^7.25.9",
|
|
43
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
44
|
+
"@babel/plugin-transform-runtime": "^7.25.9",
|
|
45
|
+
"@babel/preset-env": "^7.26.0",
|
|
46
|
+
"@vue/babel-plugin-transform-vue-jsx": "^1.4.0",
|
|
40
47
|
"autoprefixer": "8.5.0",
|
|
41
48
|
"babel-core": "6.26.0",
|
|
42
49
|
"babel-eslint": "8.2.6",
|
|
43
50
|
"babel-helper-vue-jsx-merge-props": "2.0.3",
|
|
44
|
-
"babel-loader": "
|
|
51
|
+
"babel-loader": "^9.2.1",
|
|
45
52
|
"babel-plugin-syntax-jsx": "6.18.0",
|
|
46
53
|
"babel-plugin-transform-runtime": "6.23.0",
|
|
47
54
|
"babel-plugin-transform-vue-jsx": "3.7.0",
|
|
48
|
-
"babel-preset-env": "1.7.0",
|
|
49
|
-
"babel-preset-stage-2": "6.24.1",
|
|
50
55
|
"chalk": "2.4.1",
|
|
51
56
|
"compression-webpack-plugin": "^6.1.1",
|
|
52
57
|
"copy-webpack-plugin": "^5.1.0",
|
|
53
|
-
"css-loader": "1.
|
|
58
|
+
"css-loader": "^7.1.2",
|
|
54
59
|
"eslint": "^7.0.0",
|
|
55
60
|
"eslint-friendly-formatter": "^4.0.1",
|
|
56
61
|
"eslint-loader": "^4.0.2",
|
|
57
62
|
"eslint-plugin-vue": "^7.0.0",
|
|
58
|
-
"file-loader": "
|
|
59
|
-
"friendly-errors-webpack-plugin": "1.7.0",
|
|
63
|
+
"file-loader": "^6.2.0",
|
|
60
64
|
"html-webpack-plugin": "^4.0.0",
|
|
61
|
-
"mini-css-extract-plugin": "
|
|
65
|
+
"mini-css-extract-plugin": "^2.9.2",
|
|
62
66
|
"node-notifier": "8.0.1",
|
|
63
|
-
"node-sass": "^6.0.1",
|
|
64
|
-
"optimize-css-assets-webpack-plugin": "5.0.0",
|
|
65
67
|
"ora": "3.0.0",
|
|
68
|
+
"path-browserify": "^1.0.1",
|
|
66
69
|
"path-to-regexp": "2.4.0",
|
|
67
70
|
"portfinder": "1.0.16",
|
|
68
71
|
"postcss-import": "12.0.0",
|
|
69
72
|
"postcss-loader": "2.1.6",
|
|
70
73
|
"postcss-url": "7.3.2",
|
|
71
74
|
"rimraf": "2.6.2",
|
|
72
|
-
"sass
|
|
73
|
-
"
|
|
75
|
+
"sass": "^1.83.0",
|
|
76
|
+
"sass-loader": "^16.0.4",
|
|
74
77
|
"semver": "5.5.0",
|
|
75
78
|
"shelljs": "0.8.5",
|
|
76
|
-
"svg-sprite-loader": "
|
|
79
|
+
"svg-sprite-loader": "^5.2.1",
|
|
77
80
|
"svgo": "^1.3.2",
|
|
78
81
|
"terser-webpack-plugin": "^2.2.3",
|
|
79
|
-
"url-loader": "1.
|
|
80
|
-
"vue-loader": "15.
|
|
82
|
+
"url-loader": "^4.1.1",
|
|
83
|
+
"vue-loader": "^15.11.1",
|
|
81
84
|
"vue-style-loader": "4.1.2",
|
|
82
|
-
"vue-template-compiler": "2.5.17",
|
|
83
|
-
"webpack": "^
|
|
85
|
+
"vue-template-compiler": "^2.5.17",
|
|
86
|
+
"webpack": "^5.97.1",
|
|
84
87
|
"webpack-bundle-analyzer": "^3.6.0",
|
|
85
|
-
"webpack-cli": "^
|
|
88
|
+
"webpack-cli": "^5.1.4",
|
|
86
89
|
"webpack-dev-server": "^3.9.0",
|
|
87
90
|
"webpack-merge": "4.1.4"
|
|
88
91
|
},
|
|
@@ -4,6 +4,7 @@ import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
|
|
4
4
|
|
|
5
5
|
import ElementUI from 'element-ui'
|
|
6
6
|
import 'element-ui/lib/theme-chalk/index.css'
|
|
7
|
+
import 'element-ui/lib/theme-chalk/icon.css'
|
|
7
8
|
import locale from 'element-ui/lib/locale/lang/en' // lang i18n
|
|
8
9
|
|
|
9
10
|
import '@/styles/index.scss' // global css
|
package/package.json
CHANGED
package/test/test.js
CHANGED
package/test/testutils.js
CHANGED
|
@@ -118,7 +118,7 @@ exports.getAccessKeyForUserWithPermissions = async function(api, permissions) {
|
|
|
118
118
|
.set('x-access-token', tokens.admin)
|
|
119
119
|
.expect(200)
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
const accessKey = randomstring.generate(8)
|
|
122
122
|
await exports.api.db.access_keys.create({
|
|
123
123
|
user_collection: 'users',
|
|
124
124
|
user_id: registerRes.body.id,
|
package/test/users.js
CHANGED
|
@@ -194,7 +194,7 @@ describe('user functionality', function () {
|
|
|
194
194
|
const token = await testutils.getUserWithPermissions(api, ['users: view', 'users: edit'])
|
|
195
195
|
|
|
196
196
|
const res = await request(app)
|
|
197
|
-
.get(
|
|
197
|
+
.get('/users/me')
|
|
198
198
|
.set('x-access-token', token)
|
|
199
199
|
const newUser = res.body
|
|
200
200
|
|
|
@@ -216,7 +216,7 @@ describe('user functionality', function () {
|
|
|
216
216
|
const token = await testutils.getUserWithPermissions(api, ['users: view', 'users: edit', 'users: modify owner'])
|
|
217
217
|
|
|
218
218
|
const res = await request(app)
|
|
219
|
-
.get(
|
|
219
|
+
.get('/users/me')
|
|
220
220
|
.set('x-access-token', token)
|
|
221
221
|
const newUser = res.body
|
|
222
222
|
|
|
@@ -236,7 +236,7 @@ describe('user functionality', function () {
|
|
|
236
236
|
const token = await testutils.getUserWithPermissions(api, ['users: view', 'users: edit', 'users: view hashed passwords'])
|
|
237
237
|
|
|
238
238
|
const res = await request(app)
|
|
239
|
-
.get(
|
|
239
|
+
.get('/users/me')
|
|
240
240
|
.set('x-access-token', token)
|
|
241
241
|
const newUser = JSON.parse(JSON.stringify(res.body))
|
|
242
242
|
|
|
@@ -259,7 +259,7 @@ describe('user functionality', function () {
|
|
|
259
259
|
const token = await testutils.getUserWithPermissions(api, ['users: view', 'users: edit', 'users: view hashed passwords', 'users: modify owner'])
|
|
260
260
|
|
|
261
261
|
const res = await request(app)
|
|
262
|
-
.get(
|
|
262
|
+
.get('/users/me')
|
|
263
263
|
.set('x-access-token', token)
|
|
264
264
|
const newUser = JSON.parse(JSON.stringify(res.body))
|
|
265
265
|
|
|
@@ -280,7 +280,7 @@ describe('user functionality', function () {
|
|
|
280
280
|
const token = await testutils.getUserWithPermissions(api, ['users: view', 'users: edit', 'users: modify owner'])
|
|
281
281
|
|
|
282
282
|
const res = await request(app)
|
|
283
|
-
.get(
|
|
283
|
+
.get('/users/me')
|
|
284
284
|
.set('x-access-token', token)
|
|
285
285
|
const newUser = res.body
|
|
286
286
|
|
|
@@ -295,7 +295,7 @@ describe('user functionality', function () {
|
|
|
295
295
|
const token = await testutils.getUserWithPermissions(api, ['users: view', 'users: edit', 'testdoc: create', 'testdoc: view own'])
|
|
296
296
|
|
|
297
297
|
const res = await request(app)
|
|
298
|
-
.get(
|
|
298
|
+
.get('/users/me')
|
|
299
299
|
.set('x-access-token', token)
|
|
300
300
|
const newUser = res.body
|
|
301
301
|
|
|
@@ -308,7 +308,7 @@ describe('user functionality', function () {
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
const res2 = await request(app)
|
|
311
|
-
.post(
|
|
311
|
+
.post('/testdoc')
|
|
312
312
|
.set('x-access-token', token)
|
|
313
313
|
.send(doc)
|
|
314
314
|
.expect(200) // will succeed but owner will not change
|
|
@@ -326,7 +326,7 @@ describe('user functionality', function () {
|
|
|
326
326
|
const token = await testutils.getUserWithPermissions(api, ['users: view', 'users: edit', 'testdoc: create', 'testdoc: view', 'testdoc: modify owner'])
|
|
327
327
|
|
|
328
328
|
const res = await request(app)
|
|
329
|
-
.get(
|
|
329
|
+
.get('/users/me')
|
|
330
330
|
.set('x-access-token', token)
|
|
331
331
|
const newUser = res.body
|
|
332
332
|
|
|
@@ -339,7 +339,7 @@ describe('user functionality', function () {
|
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
const res2 = await request(app)
|
|
342
|
-
.post(
|
|
342
|
+
.post('/testdoc')
|
|
343
343
|
.set('x-access-token', token)
|
|
344
344
|
.send(doc)
|
|
345
345
|
.expect(200) // will succeed but owner will not change
|
|
@@ -357,7 +357,7 @@ describe('user functionality', function () {
|
|
|
357
357
|
const token = await testutils.getUserWithPermissions(api, ['users: view', 'users: edit', 'testdoc: edit', 'testdoc: view own'])
|
|
358
358
|
|
|
359
359
|
const res = await request(app)
|
|
360
|
-
.get(
|
|
360
|
+
.get('/users/me')
|
|
361
361
|
.set('x-access-token', token)
|
|
362
362
|
const newUser = res.body
|
|
363
363
|
|
|
@@ -392,7 +392,7 @@ describe('user functionality', function () {
|
|
|
392
392
|
const token = await testutils.getUserWithPermissions(api, ['users: view', 'users: edit', 'testdoc: edit', 'testdoc: view', 'testdoc: modify owner'])
|
|
393
393
|
|
|
394
394
|
const res = await request(app)
|
|
395
|
-
.get(
|
|
395
|
+
.get('/users/me')
|
|
396
396
|
.set('x-access-token', token)
|
|
397
397
|
const newUser = res.body
|
|
398
398
|
|