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
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,11 +102,11 @@ app.listen(3000, () => {
102
102
103
103
## Session Variables Setup
104
104
105
-
These variables must be set in your `req.session` object to enable CommTrackr functionality:
105
+
These variables must be set in your `req.session` object to enable CommTrackr functionality. Alternatively, you can modify the variable names to match your custom session configuration using the `vars` configuration during initialization.
106
106
107
107
### userId
108
108
109
-
`req.session.userId` must contain a unique identifier for the user, such as a username or user ID. This is used to track user-specific data. This must be present for CommTrackr to detect a logged-in user.
109
+
`userId` must contain a unique identifier for the user, such as a username or user ID. This is used to track user-specific data. This must be present for CommTrackr to detect a logged-in user.
110
110
111
111
Type: `String`
112
112
@@ -118,31 +118,31 @@ Session Example: `'id'`
118
118
119
119
### userName
120
120
121
-
`req.session.userName` should contain the name of the user. This is used for display purposes in the CommTrackr interface. Fallback to `userId` if not set.
121
+
`userName` should contain the name of the user. This is used for display purposes in the CommTrackr interface. Fallback to `userId` if not set.
122
122
123
123
Type: `String`
124
124
125
125
Default: `'name'`
126
126
127
-
Fallback: `req.session.userId`
127
+
Fallback: `userId`
128
128
129
129
Session Example: `'John Doe'`
130
130
131
131
### role
132
132
133
-
`req.session.role` should contain the role of the user: 'admin', `dev`, or 'user'. This is used to control access to certain features and functionalities within CommTrackr.
133
+
`role` should contain the role of the user: 'admin', `dev`, or 'user'. This is used to control access to certain features and functionalities within CommTrackr.
134
134
135
135
Type: `String`
136
136
137
137
Default: `'role'`
138
138
139
-
Fallback: `user`
139
+
Fallback: `'user'`
140
140
141
141
Session Example: `'user'`, `'dev'`, `'admin'`
142
142
143
143
### roleAliases
144
144
145
-
`req.session.role` can also be set to custom role names. Use `roleAliases` to map your custom role names to the standard roles used by CommTrackr.
145
+
`role` can also be set to custom role names. Use `roleAliases` to map your custom role names to the standard roles used by CommTrackr.
146
146
147
147
Type: `Object`
148
148
@@ -154,7 +154,7 @@ Default:
154
154
155
155
### access
156
156
157
-
`req.session.access` can be used as an alternative to `role` for access control. It should contain numeric access levels. Use the `access` configuration to define which levels correspond to 'user', 'dev', and 'admin'.
157
+
`access` can be used as an alternative to `role` for access control. It should contain numeric access levels. Use the `access` configuration to define which levels correspond to 'user', 'dev', and 'admin'.
158
158
159
159
Type: `Array`
160
160
@@ -166,7 +166,7 @@ Default:
166
166
167
167
### commissions
168
168
169
-
`req.session.commissions` should be an array of commission objects associated with the user. Each commission object should have the following structure:
169
+
`commissions` should be an array of commission objects associated with the user. Each commission object should have the following structure:
0 commit comments