File tree Expand file tree Collapse file tree 2 files changed +47
-1
lines changed Expand file tree Collapse file tree 2 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 46
46
src/scripts$ node encryptDecryptEmails.js decrypt
47
47
```
48
48
49
+ 2. **API Permissions:**
50
+ - The API can only be accessed using the appropriate permissions.
51
+
49
52
### Enhancements:
50
53
54
+ 1. **Re-Build Materialized Views :**
55
+
56
+ - To update the views
57
+
58
+ **Steps to rebuild the meterialize views :**
59
+
60
+ - Run the below curl
61
+
62
+ ```
63
+ curl --location --request GET 'http://localhost:7101/user/v1/admin/triggerViewRebuildInternal' \
64
+ --header 'internal_access_token: INTERNAL_ACCESS_TOKEN'
65
+ ```
66
+ 2. **Upload the latest sample csv**
67
+
68
+ - To upload the latest sample csv, run the below commmand
69
+
70
+ ```
71
+ cd scripts/
72
+ node -r module-alias/register uploadSampleCSV.js
73
+ ```
74
+
51
75
### Bug Fixes:
52
76
53
77
### Infrastructure:
Original file line number Diff line number Diff line change @@ -895,8 +895,30 @@ module.exports = class AccountHelper {
895
895
delete user . password
896
896
delete user . otpInfo
897
897
898
+ let defaultOrg = await organizationQueries . findOne (
899
+ { code : process . env . DEFAULT_ORGANISATION_CODE } ,
900
+ { attributes : [ 'id' ] }
901
+ )
902
+ let defaultOrgId = defaultOrg . id
903
+ const modelName = await userQueries . getModelName ( )
904
+
905
+ let validationData = await entityTypeQueries . findUserEntityTypesAndEntities ( {
906
+ status : 'ACTIVE' ,
907
+ organization_id : {
908
+ [ Op . in ] : [ user . organization_id , defaultOrgId ] ,
909
+ } ,
910
+ model_names : { [ Op . contains ] : [ modelName ] } ,
911
+ } )
912
+
913
+ const prunedEntities = removeDefaultOrgEntityTypes ( validationData , user . organization_id )
914
+ user = utils . processDbResponse ( user , prunedEntities )
915
+
898
916
// Check if user and user.image exist, then fetch a downloadable URL for the image
899
- if ( user && user . image ) user . image = await utils . getDownloadableUrl ( user . image )
917
+ if ( user && user . image ) {
918
+ user . image = await utils . getDownloadableUrl ( user . image )
919
+ }
920
+ user . email = plaintextEmailId
921
+
900
922
const result = { access_token : accessToken , refresh_token : refreshToken , user }
901
923
return responses . successResponse ( {
902
924
statusCode : httpStatusCode . ok ,
You can’t perform that action at this time.
0 commit comments