You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -244,7 +244,7 @@ npm run data:import -- --file path/to-file.json
244
244
245
245
- As this commands calls topcoder services to get data like members details, so you have to provide environment variables `AUTH0_CLIENT_ID`, `AUTH0_CLIENT_SECRET`, `AUTH0_URL`, `AUTH0_AUDIENCE`, `AUTH0_PROXY_SERVER_URL`, they would automatically picked up from the `.env` file if provided.
246
246
247
-
- If you encounter conflicts errors during import, you may need to recreated database tables and Elasticssearch indexes by `npm run sync:all`.
247
+
- If you encounter conflicts errors during import, you may need to recreated database tables and Elasticssearch indexes by `npm run local:reset`.
248
248
249
249
- List of models that will be imported are defined in`scripts/data/dataModels.js`. You can add new models to this list, but make sure that new models are added to list such that each model comes after its dependencies.
250
250
@@ -289,7 +289,6 @@ This command for importing data uses API to create demo data. Which has a few pe
289
289
|`npm run startKafkaConsumers:dev`| Start Kafka consumer app in the development mode using `nodemon`. |
290
290
|`npm run test`| Run tests. |
291
291
|`npm run test:watch`| Run tests and re-run them on changes (not useful now as it re-runs all the test). |
292
-
|`npm run reset:all`| Recreate Database and Elasticsearch indexes (removes any existent data). |
293
292
|`npm run reset:db`| Recreate Database schemas (removes any existent data). |
294
293
|`npm run reset:es`| Recreate Elasticsearch indexes (removes any existent data). |
295
294
|`npm run import-from-api`| Import Metadata from DEV environment, see [docs](#import-metadata-from-apitopcoder-devcom-deprecated). |
@@ -300,6 +299,7 @@ This command for importing data uses API to create demo data. Which has a few pe
300
299
|`npm run services:down`| Stop services via docker-compose forlocal development. |
301
300
|`npm run services:logs -- -f <service_name>`| View logs of some service inside docker-compose. |
302
301
|`npm run local:init`| Recreate Database and Elasticsearch indexes and populate demo data forlocal development (removes any existent data). |
302
+
|`npm run local:reset`| Recreate Database and Elasticsearch indexes (removes any existent data). |
303
303
|`npm run babel-node-script -- <path/to/script>`| Helper command which is used by other commands to run node scripts using `babel-node` and `dotenv` so variables from `.env` file are automatically applied. |
304
304
|`npm run generate:doc:permissions`| Generate [permissions.html](docs/permissions.html) which later can be viewed by [link](https://htmlpreview.github.io/?https://github.com/topcoder-platform/tc-project-service/blob/develop/docs/permissions.html). |
305
305
|`npm run generate:doc:permissions:dev`| Generate [permissions.html](docs/permissions.html) on any changes (useful during development). |
Copy file name to clipboardExpand all lines: docs/guides/permissions-guide/permissions-guide.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,9 +36,7 @@ Let's say you would like to add a new place in code where you want to check user
36
36
37
37
- Follow the guides on how to add a new permission in the header of this file.
38
38
39
-
3. After you add a new permission, regenerate [permissions list](https://htmlpreview.github.io/?https://github.com/topcoder-platform/tc-project-service/blob/develop/docs/permissions.html) by running `npm run generate:doc:permissions`.
40
-
41
-
4. There are 2 places where you would usually check permissions:
39
+
3. There are 2 places where you would usually check permissions:
42
40
1. Check if user can call some endpoint (https://github.com/topcoder-platform/tc-project-service/blob/develop/src/permissions/index.js):
43
41
44
42
```js
@@ -69,6 +67,8 @@ Let's say you would like to add a new place in code where you want to check user
69
67
}
70
68
```
71
69
70
+
4. After you've added all the new permissions you wanted, regenerate [permissions list](https://htmlpreview.github.io/?https://github.com/topcoder-platform/tc-project-service/blob/develop/docs/permissions.html) by running `npm run generate:doc:permissions`. Or run `npm run generate:doc:permissions:dev` which would automatically regenerate HTML file on every change - very useful during development.
0 commit comments