Skip to content

Commit 1d2c994

Browse files
committed
Update README
1 parent d0d458f commit 1d2c994

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ app.listen(3000, () => {
102102

103103
## Session Variables Setup
104104

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.
106106

107107
### userId
108108

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.
110110

111111
Type: `String`
112112

@@ -118,31 +118,31 @@ Session Example: `'id'`
118118

119119
### userName
120120

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.
122122

123123
Type: `String`
124124

125125
Default: `'name'`
126126

127-
Fallback: `req.session.userId`
127+
Fallback: `userId`
128128

129129
Session Example: `'John Doe'`
130130

131131
### role
132132

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.
134134

135135
Type: `String`
136136

137137
Default: `'role'`
138138

139-
Fallback: `user`
139+
Fallback: `'user'`
140140

141141
Session Example: `'user'`, `'dev'`, `'admin'`
142142

143143
### roleAliases
144144

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.
146146

147147
Type: `Object`
148148

@@ -154,7 +154,7 @@ Default:
154154

155155
### access
156156

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'.
158158

159159
Type: `Array`
160160

@@ -166,7 +166,7 @@ Default:
166166

167167
### commissions
168168

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:
170170

171171
Type: `Array`
172172

0 commit comments

Comments
 (0)