Compare View
Commits (2)
Diff
Showing 1 changed file Side-by-side Diff
DesignUseCases.tex
View file @
b7134f4
... | ... | @@ -43,6 +43,7 @@ Kevin Mach & User Interface Specialist\\ |
43 | 43 | \newpage |
44 | 44 | \tableofcontents |
45 | 45 | \newpage |
46 | + | |
46 | 47 | \section{Accounts} |
47 | 48 | \subsection{[A1] User Registration} |
48 | 49 | \begin{description}[style=multiline,leftmargin=3cm] |
... | ... | @@ -54,7 +55,7 @@ specified username, password, email. The user will be able to log into |
54 | 55 | the aforementioned account.} |
55 | 56 | \\ |
56 | 57 | \item[User Goals]{The user shall have an account to participate in the |
57 | -website's activities.} | |
58 | +application's activities.} | |
58 | 59 | |
59 | 60 | \item[Primary Actor]{User (student)} |
60 | 61 | |
... | ... | @@ -62,9 +63,9 @@ website's activities.} |
62 | 63 | \\ |
63 | 64 | \item[Priority Level]{``Must''} |
64 | 65 | |
65 | -\item[Status]{Not Implemented} | |
66 | +\item[Status]{Implemented} | |
66 | 67 | |
67 | -\item[Pre-conditions] | |
68 | +\item[Pre-conditions]: None. | |
68 | 69 | |
69 | 70 | \item[Post-conditions] |
70 | 71 | |
... | ... | @@ -81,36 +82,38 @@ website's activities.} |
81 | 82 | \begin{enumerate} |
82 | 83 | \itemsep1pt\parskip0pt\parsep0pt |
83 | 84 | \item |
84 | - {The user shall click the sign up button.} | |
85 | + {The frontend renders the login form described in login.html.} | |
86 | +\item | |
87 | + {The User shall click the sign up toggle.} | |
85 | 88 | \item |
86 | - {The client renders a registration form and displays it to the user} | |
89 | + {The frontend shall render a registration form and display it to the User.} | |
87 | 90 | \item |
88 | - {The user fills the form} | |
91 | + {The User shal fill in the form.} | |
89 | 92 | \item |
90 | - {The client checks that the provided email is not invalid, and that | |
93 | + {The frontend checks that the provided email is not invalid, and that | |
91 | 94 | the password is not valid. If anything is not valid, it displays an |
92 | 95 | error and returns this to the user. } |
93 | 96 | \item |
94 | - {If the form is valid, the client POSTs the form in JSON format to the | |
95 | - server API at /api/me.} | |
97 | + {If the form is valid, the frontent POSTs the form in JSON format to the | |
98 | + server API at /api/verify\_email/.} | |
96 | 99 | \item |
97 | - {The server deserializes and validates the data. If it's not valid, it | |
98 | - returns an error to the client.} | |
100 | + {The backend deserializes and validates the data in /api/register. If it's not valid, it | |
101 | + returns an error to the frontend.} | |
99 | 102 | \item |
100 | - {The server creates a new User object from the provided data, filling | |
101 | - in the appropriate fields} | |
103 | + {The backend creates a new User object from the provided data, filling | |
104 | + in the email and password fields in models.py in model method create\_user.} | |
102 | 105 | \item |
103 | - {The server saves the user object} | |
106 | + {The backend saves the User object in models.py.} | |
104 | 107 | \item |
105 | - {The server marks the user's email as unverified} | |
108 | + {The backend marks the User's email as unverified.} | |
106 | 109 | \item |
107 | - {The server sends an email to the user's address with a link to | |
108 | - validate the user's email address.} | |
110 | + {The backend sends an email to the User's address with a link to | |
111 | + validate the user's email address from models.py in function send\_confirmation\_email.} | |
109 | 112 | \item |
110 | - {The server responds with success and logs the user in on a new | |
111 | - session for the user. } | |
113 | + {The backend responds with success and logs the User in on a new | |
114 | + session for the User. } | |
112 | 115 | \item |
113 | - {The client reports success to the user and stores the sessionid for | |
116 | + {The frontend reports success to the User and stores the sessionid for | |
114 | 117 | future requests.} |
115 | 118 | \end{enumerate} |
116 | 119 | |
... | ... | @@ -119,18 +122,18 @@ website's activities.} |
119 | 122 | \begin{enumerate} |
120 | 123 | \itemsep1pt\parskip0pt\parsep0pt |
121 | 124 | \item |
122 | - {The user receives an email with a link to verify their email. The | |
123 | - user clicks the link} | |
125 | + {The User receives an email with a link to verify their email. The | |
126 | + User clicks the link} | |
124 | 127 | \item |
125 | - {The client submits the verification code to the server} | |
128 | + {The frontend in VerifyEmailController submits a POST request to the backend.} | |
126 | 129 | \item |
127 | - {The server validates the code. If the code is not valid, it returns | |
128 | - an error to the client.} | |
130 | + {The backend validates the code in views.py in function veryify\_email. If the code is not valid, it returns | |
131 | + an error to the frontend.} | |
129 | 132 | \item |
130 | - {The server marks the user's email as valid and saves the User object | |
131 | - again. The user's account is now active} | |
133 | + {The backend marks the user's email as confirmed and saves the User object | |
134 | + again in models.py in function confirm\_email. The user's account is now active.} | |
132 | 135 | \item |
133 | - {The client reports success. } | |
136 | + {The frontend's VerifyEmailController.js reports success and logs the User in to the application. } | |
134 | 137 | \end{enumerate} |
135 | 138 | |
136 | 139 | \end{description} |
... | ... | @@ -155,14 +158,15 @@ device, or use the site after logging out.} |
155 | 158 | \\ |
156 | 159 | \item[Priority Level]{``Must''} |
157 | 160 | |
158 | -\item[Status]{Not Implemented} | |
161 | +\item[Status]{Implemented} | |
159 | 162 | |
160 | 163 | \item[Pre-conditions] |
161 | 164 | |
162 | 165 | \begin{itemize} |
163 | 166 | \itemsep1pt\parskip0pt\parsep0pt |
164 | 167 | \item |
165 | - {The user has created an account before.} | |
168 | + {The User has registered an account.} | |
169 | + {The User knows their email and password.} | |
166 | 170 | \end{itemize} |
167 | 171 | |
168 | 172 | \item[Post-conditions] |
... | ... | @@ -170,41 +174,42 @@ device, or use the site after logging out.} |
170 | 174 | \begin{itemize} |
171 | 175 | \itemsep1pt\parskip0pt\parsep0pt |
172 | 176 | \item |
173 | - {The user can navigate the site and see their data.} | |
177 | + {The User can navigate the site and see their data.} | |
174 | 178 | \end{itemize} |
175 | 179 | |
176 | -\item[Trigger]{The User shall enter their email and password into the Login | |
177 | -form. The user then submits this information by clicking the ``Login'' | |
178 | -button or pressing the return key.} | |
180 | +\item[Trigger]{The User wants to use the application and its core features.} | |
179 | 181 | |
180 | 182 | \item[Workflow] |
181 | 183 | |
182 | 184 | \begin{enumerate} |
183 | 185 | \itemsep1pt\parskip0pt\parsep0pt |
184 | 186 | \item |
185 | - {The server verifies that the User has submitted an email and password} | |
187 | +{The frontend shall render the login form described in login.html and implemented in LoginController.js} | |
188 | +\item | |
189 | +{The User shall type in their email and password.} | |
190 | +\item | |
191 | + {The backend shall verify that the User has submitted their email and password in views.py in function login.} | |
186 | 192 | \item |
187 | - {The server authenticates the User's email and password and checks if the | |
188 | - User is active} | |
193 | + {The backend shall check that the User is active in views.py in function login.} | |
189 | 194 | \item |
190 | - {The server logs the User in using the Django login feature} | |
195 | + {The backend shall log the User in using the Django login feature.} | |
191 | 196 | \item |
192 | - {Front-end displays the home page for the User} | |
197 | + {The frontend shall displays the home page for the User.} | |
193 | 198 | \end{enumerate} |
194 | 199 | \end{description} |
195 | 200 | \newpage |
196 | 201 | |
197 | 202 | \subsection{[A3] Add a Class} |
198 | 203 | \begin{description} |
199 | -\item[Description]{The user shall be able to add a class and access the | |
204 | +\item[Description]{The User shall be able to add a class and access the | |
200 | 205 | flashcards associated with that class.} |
201 | 206 | |
202 | -\item[Desired Outcome]{The class shall be linked with the student's account | |
203 | -and the student shall have the ability to read and publish flashcards | |
207 | +\item[Desired Outcome]{The class shall be connected to the student's account | |
208 | +and the User shall have the ability to read and publish flashcards | |
204 | 209 | for this class.} |
205 | 210 | \\ |
206 | -\item[User Goals]{The user wants to publish flashcards for this class, and | |
207 | -reads the flashcards for this class that are published by other users.} | |
211 | +\item[User Goals]{The User wants to publish flashcards for this class, and | |
212 | +read the flashcards for this class that are published by other users.} | |
208 | 213 | |
209 | 214 | \item[Primary Actor]{User (student)} |
210 | 215 | |
... | ... | @@ -213,16 +218,16 @@ Login} |
213 | 218 | \\ |
214 | 219 | \item[Priority Level]{``Must''} |
215 | 220 | |
216 | -\item[Status]{Not implemented} | |
221 | +\item[Status]{Implemented} | |
217 | 222 | |
218 | 223 | \item[Pre-conditions] |
219 | 224 | |
220 | 225 | \begin{itemize} |
221 | 226 | \itemsep1pt\parskip0pt\parsep0pt |
222 | 227 | \item |
223 | - {The user has created an account.} | |
228 | + {The User has registered an account.} | |
224 | 229 | \item |
225 | - {The user is logged in to their account and is at root view} | |
230 | + {The User has successfully logged in to the application.} | |
226 | 231 | \end{itemize} |
227 | 232 | |
228 | 233 | \item[Post-conditions] |
... | ... | @@ -230,72 +235,83 @@ Login} |
230 | 235 | \begin{itemize} |
231 | 236 | \itemsep1pt\parskip0pt\parsep0pt |
232 | 237 | \item |
233 | - {The user can read the flashcards being published for the class and | |
234 | - add them to his/her deck.} | |
238 | + {The User can view the flashcards being published for the class and | |
239 | + add them to their deck.} | |
235 | 240 | \item |
236 | - {The user can publish flashcards to be viewed and added by other users | |
241 | + {The User can publish flashcards to be viewed and added by other users | |
237 | 242 | in the same class.} |
238 | 243 | \end{itemize} |
239 | 244 | |
240 | -\item[Trigger]{The user wants to add a class.} | |
245 | +\item[Trigger]{The User wants to make flashcards and view flashcards for a class.} | |
241 | 246 | |
242 | 247 | \item[Workflow] |
243 | 248 | |
244 | 249 | \begin{enumerate} |
245 | 250 | \itemsep1pt\parskip0pt\parsep0pt |
246 | 251 | \item |
247 | - {The user shall click add a class on the sidebar.} | |
252 | + {The User shall click "Add a Class" from the drop down menu in the upper left hand corner.} | |
248 | 253 | \item |
249 | - {The client shall bring the user to a AddClassView.} | |
254 | + {The frontend shall navigate to the new page described by addclass.html.} | |
250 | 255 | \item |
251 | - {The user begins to type their class name or number.} | |
256 | + {The User shall begin to type the class department code, course title, course number, or instructor in the text box.} | |
252 | 257 | \item |
253 | - {The ShowSuggestion shall show suggestions as a user types.} | |
254 | -\end{enumerate} | |
255 | - | |
256 | -\begin{itemize} | |
257 | -\itemsep1pt\parskip0pt\parsep0pt | |
258 | + {The frontend in ClassAddController.js shall send a get request to the backend at api/sections/search/.} | |
258 | 259 | \item |
259 | - {Implementation unspecified at present; need to do further research | |
260 | - (django-autocomplete-lite?)} | |
261 | -\end{itemize} | |
260 | + {The backend shall search the database for the classes matching department code, course title, course number, or instructor in models.py in function search.} | |
261 | +\item | |
262 | + {The frontend shall show the classes that the backend has found.} | |
263 | +\item | |
264 | + {The User shall select from the classes the one that they want to add.} | |
265 | +\item | |
266 | + {The frontend shall enable the 'Add Class' button.} | |
267 | +\item | |
268 | + {The User shall click 'Add Class' button to the right of the text box.} | |
269 | +\item | |
270 | + {The frontend shall send a post request to api/sections/.} | |
271 | +\item | |
272 | + {The backend shall in views.py in function enroll shall call the method enroll in models.py.} | |
273 | +\item | |
274 | + {The backend in models.py in function enroll shall add the class to the User's sections.} | |
275 | +\item | |
276 | + {The frontend shall redirect the User to the class's Live Feed using the ClassAddController.js.} | |
277 | +\item | |
278 | + {The frontend shall present the live feed for the class by using feed.html and FeedController.js.} | |
279 | + | |
280 | +\end{enumerate} | |
262 | 281 | |
282 | +\item[Alternate Workflow: User is whitelisted.\\] | |
263 | 283 | \begin{enumerate} |
264 | 284 | \setcounter{enumi}{3} |
265 | 285 | \itemsep1pt\parskip0pt\parsep0pt |
286 | +\item []{ Precondition: The class has a whitelist, a whitelist is a list of email addresses that can add themselves to the class.\\} | |
287 | +\item | |
288 | + {The User shall select their desired class, which has a whitelist, by clicking on ``Add Class''.} | |
266 | 289 | \item |
267 | - {The user shall select a class by clicking on ``Add Class''.} | |
290 | + {The frontend shall submit a POST request to /api/me/sections with | |
291 | + the course ID that the User typed. } | |
268 | 292 | \item |
269 | - {The client shall submit a POST request to /api/me/sections with | |
270 | - the course ID that the User added. } | |
293 | + {The backend shall check if there is a whitelist for the class that the | |
294 | + User has selected in models.py at function is\_whitelisted.} | |
271 | 295 | \item |
272 | - {The server shall check if there is a whitelist for the class that the | |
273 | - user is trying to add.} | |
296 | + {The backend shall check if the user is on the whitelist in models.py | |
297 | + in function is\_user\_on\_whitelist.} | |
274 | 298 | \item |
275 | - {The server shall ensure that the user is whitelisted.} | |
299 | + {The backend shall add the User to the class following steps above.} | |
276 | 300 | \item |
277 | - {The server shall link the user to the section.} | |
301 | + {The frontend shall redirect the User to the class's live feed followed the last step in the Workflow above.} | |
278 | 302 | \end{enumerate} |
279 | 303 | |
280 | 304 | \item[Alternate Workflow: User is not whitelisted.] |
281 | 305 | \begin{enumerate} |
282 | 306 | \setcounter{enumi}{7} |
283 | 307 | \itemsep1pt\parskip0pt\parsep0pt |
308 | +\item []{ Precondition: The class has a whitelist, a whitelist is a list of email addresses that can add themselves to the class.\\} | |
284 | 309 | \item |
285 | - {The server shall deny user access to class.} | |
310 | + {The backend shall will check that the user is in the whitelist in models.py.} | |
286 | 311 | \item |
287 | - {The client shall display failure message to user.} | |
312 | + {The frontend shall display that the class is whitelisted and the Add Class button will not be enabled.} | |
288 | 313 | \end{enumerate} |
289 | 314 | |
290 | -\item[Alternate Workflow: There is no whitelist.] | |
291 | -\begin{enumerate} | |
292 | -\setcounter{enumi}{6} | |
293 | -\itemsep1pt\parskip0pt\parsep0pt | |
294 | -\item | |
295 | - {The server shall link the user to the section.} | |
296 | -\item | |
297 | - {The client shall display success message to user.} | |
298 | -\end{enumerate} | |
299 | 315 | \end{description} |
300 | 316 | {} |
301 | 317 | |
... | ... | @@ -306,16 +322,16 @@ Login} |
306 | 322 | \subsection{[A4] Drop a Class} |
307 | 323 | |
308 | 324 | \begin{description} |
309 | -\item[Description]{The user can remove themselves from a course he/she is | |
325 | +\item[Description]{The User can remove themselves from a course he/she is | |
310 | 326 | registered to} |
311 | 327 | |
312 | -\item[Desired Outcome]{The user has dropped the class and no longer need | |
328 | +\item[Desired Outcome]{The User has dropped the class and no longer need | |
313 | 329 | access to the flashcards for said class. This means they can no longer |
314 | 330 | see the flashcards associated to the class that they dropped } |
315 | 331 | \\ |
316 | -\item[User Goals]{The user shall not have access to a class and the | |
332 | +\item[User Goals]{The User shall not have access to a class and the | |
317 | 333 | flashcards associated with that class. They will no longer see the class |
318 | -listed in their list of ``Enrolled Classes''} | |
334 | +listed in their drop down menu.} | |
319 | 335 | |
320 | 336 | \item[Primary Actor]{User (student)} |
321 | 337 | |
... | ... | @@ -324,18 +340,20 @@ Login, {[}A3{]} Add a Class} |
324 | 340 | \\ |
325 | 341 | \item[Priority Level]{ ``Should''} |
326 | 342 | |
327 | -\item[Status]{Not Implemented } | |
343 | +\item[Status]{Implemented } | |
328 | 344 | |
329 | 345 | \item[Pre-conditions] |
330 | 346 | |
331 | 347 | \begin{itemize} |
332 | 348 | \itemsep1pt\parskip0pt\parsep0pt |
333 | 349 | \item |
334 | - {User has a valid account.} | |
350 | + {The User has a valid account.} | |
335 | 351 | \item |
336 | - {User is logged in.} | |
352 | + {The User is logged in.} | |
353 | +\item | |
354 | + {The User has enrolled in at least one class.} | |
337 | 355 | \item |
338 | - {User has enrolled in classes.} | |
356 | + {The User has navigated to the Settings page.} | |
339 | 357 | \end{itemize} |
340 | 358 | |
341 | 359 | \item[Post-conditions]{} |
... | ... | @@ -347,32 +365,23 @@ Login, {[}A3{]} Add a Class} |
347 | 365 | flashcards} |
348 | 366 | \end{itemize} |
349 | 367 | |
350 | -\item[Trigger]{User clicked button to drop class.} | |
368 | +\item[Trigger]{User no longer wants to see flashcards from that class.} | |
351 | 369 | |
352 | 370 | \item[Workflow] |
353 | 371 | |
354 | 372 | \begin{enumerate} |
355 | 373 | \itemsep1pt\parskip0pt\parsep0pt |
356 | 374 | \item |
357 | - {The user shall click ``Drop'' (or equivalent) button.} | |
358 | -\item | |
359 | - {The client shall display a dialogue box which will say ``Are you | |
360 | - sure you want to drop this class?''} | |
361 | -\item | |
362 | - {The user shall click ``Yes'' to confirm that they want to drop the | |
363 | - class} | |
375 | + {The User shall click `Drop' button to the right of the class they wish to drop.} | |
364 | 376 | \item |
365 | - {The client shall submit a DELETE request to | |
377 | + {The frontend shall submit a DELETE request to | |
366 | 378 | /api/me/sections/\textless{}section ID number\textgreater{}.} |
367 | 379 | \item |
368 | - {If the user is not already enrolled in the section, the server will | |
369 | - return a 404 Not Found error, which the client shall handle. (The | |
370 | - client should not show an error to the user)} | |
380 | + {The backend shall check that the User is enrolled in the section in models.py in function drop.} | |
371 | 381 | \item |
372 | - {The server shall remove the selected class from a user's list of | |
373 | - classes. } | |
382 | + {The server shall remove the selected class from a user's list of section in models.py in function drop. } | |
374 | 383 | \item |
375 | - {The server shall return success to the client} | |
384 | + {The frontend shall remove the class from the list in setting and show toast reading 'Dropped'.} | |
376 | 385 | \end{enumerate} |
377 | 386 | \end{description} |
378 | 387 | \newpage |
... | ... | @@ -382,38 +391,39 @@ Login, {[}A3{]} Add a Class} |
382 | 391 | \subsection{[A5] Password change} |
383 | 392 | |
384 | 393 | \begin{description} |
385 | -\item[Description]{The user shall be able to change the password for their | |
386 | -account in the account settings. This requires that they are logged in. | |
387 | -} | |
394 | +\item[Description]{The User shall be able to change the password for their | |
395 | +account in the account settings. } | |
388 | 396 | |
389 | -\item[Desired Outcome]{The user's password shall be changed and the user | |
397 | +\item[Desired Outcome]{The User's password shall be changed and the User | |
390 | 398 | shall be able to log in with the new password in the future} |
391 | 399 | \\\\ |
392 | -\item[User Goals]{The user wants to use a different password in the future} | |
400 | +\item[User Goals]{The User wants to use a different password in the future} | |
393 | 401 | |
394 | 402 | \item[Primary Actor]{User (student)} |
395 | 403 | |
396 | 404 | \item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User |
397 | 405 | Login} |
398 | 406 | \\ |
399 | -\item[Details]{The user provides their current password and a new password | |
407 | +\item[Details]{The User provides their current password and a new password | |
400 | 408 | in a form. If the current password is correct, the system updates their |
401 | 409 | password to the requested new password.} |
402 | 410 | |
403 | 411 | \item[Priority Level]{``Must''} |
404 | 412 | |
405 | -\item[Status]{Not }{implemented} | |
413 | +\item[Status]{Implemented} | |
406 | 414 | |
407 | 415 | \item[Pre-conditions] |
408 | 416 | |
409 | 417 | \begin{itemize} |
410 | 418 | \itemsep1pt\parskip0pt\parsep0pt |
411 | 419 | \item |
412 | - {The user has created an account} | |
420 | + {The User has registered an account.} | |
421 | +\item | |
422 | + {The User has logged in.} | |
413 | 423 | \item |
414 | - {The user has logged in } | |
424 | + {The User knows their current password.} | |
415 | 425 | \item |
416 | - {The user knows their current password} | |
426 | + {The User has navigated to the Settings page.} | |
417 | 427 | \end{itemize} |
418 | 428 | |
419 | 429 | \item[Post-conditions] |
... | ... | @@ -421,12 +431,12 @@ password to the requested new password.} |
421 | 431 | \begin{itemize} |
422 | 432 | \itemsep1pt\parskip0pt\parsep0pt |
423 | 433 | \item |
424 | - {The user's password is changed} | |
434 | + {The User's password is changed} | |
425 | 435 | \item |
426 | - {The user can log in with the new password} | |
436 | + {The User can log in with the new password} | |
427 | 437 | \end{itemize} |
428 | 438 | |
429 | -\item[Trigger]{User clicks ``Change Password'' button in Accounts page} | |
439 | +\item[Trigger]{The User wants to change their password.} | |
430 | 440 | |
431 | 441 | \item[Error Handling] |
432 | 442 | \begin{description} |
... | ... | @@ -446,23 +456,21 @@ password to the requested new password.} |
446 | 456 | \begin{enumerate} |
447 | 457 | \itemsep1pt\parskip0pt\parsep0pt |
448 | 458 | \item |
449 | - {The user shall press the ``Change Password'' button} | |
459 | + {The frontend shall render a form that requires the user to enter their | |
460 | + old password and new password from settings.html} | |
450 | 461 | \item |
451 | - {The client shall render a form that requires the user to enter their | |
452 | - old password and new password} | |
462 | + {The User shall type in their current password, the desired new | |
463 | + password, and retype the desired new password to confirm.} | |
453 | 464 | \item |
454 | - {The user shall enter their current password and the desired new | |
455 | - password} | |
456 | -\item | |
457 | - {The client shall submit the data to the server by sending a PATCH | |
465 | + {The frontend shall submit the data to the server by sending a PATCH | |
458 | 466 | request to /api/me containing ``old\_password'' and |
459 | - ``new\_password'' values.} | |
467 | + ``new\_password'' values in SettingsController.js.} | |
460 | 468 | \item (The ) |
461 | 469 | \item |
462 | - {The server shall check the user's current password} | |
463 | -\item The server shall update the user's current password | |
470 | + {The backend shall check the user's current password in views.py in function patch under UserDetail.} | |
471 | +\item The backend shall update the user's current password in views.py in function patch under UserDetail. | |
464 | 472 | \item |
465 | - {The client shall report success to the user} | |
473 | + {The frontend shall present a toast reading "Password successfully changed" and redirect the User to the Add a Class page.} | |
466 | 474 | \end{enumerate} |
467 | 475 | \end{description} |
468 | 476 | {} |
... | ... | @@ -474,14 +482,13 @@ password to the requested new password.} |
474 | 482 | \subsection{[A6] Password reset} |
475 | 483 | |
476 | 484 | \begin{description} |
477 | -\item[Description]{The user shall be able to reset their password without | |
478 | -being logged in } | |
485 | +\item[Description]{The User shall be able to reset their password without | |
486 | +being logged in.} | |
479 | 487 | |
480 | -\item[Desired Outcome]{The user's password shall be changed to one that | |
481 | -they remember} | |
488 | +\item[Desired Outcome]{The User's password shall be changed to one that | |
489 | +they remember.} | |
482 | 490 | \\ |
483 | -\item[User Goals]{The user does not know their current password but wants | |
484 | -to log into the site} | |
491 | +\item[User Goals]{The User will be able to log into the site with a new password.} | |
485 | 492 | |
486 | 493 | \item[Primary Actor]{User (student)} |
487 | 494 | |
... | ... | @@ -498,16 +505,18 @@ if the token is correct. } |
498 | 505 | |
499 | 506 | \item[Priority Level]{``Must''} |
500 | 507 | |
501 | -\item[Status]{Not i}{mplemented} | |
508 | +\item[Status]{Implemented} | |
502 | 509 | |
503 | 510 | \item[Pre-conditions] |
504 | 511 | |
505 | 512 | \begin{itemize} |
506 | 513 | \itemsep1pt\parskip0pt\parsep0pt |
507 | 514 | \item |
508 | - {The user has created an account before} | |
515 | + {The User has created an account before.} | |
509 | 516 | \item |
510 | - {The user knows the email address attached to their account} | |
517 | + {The User knows the email address attached to their account for our application.} | |
518 | +\item | |
519 | + {The User can log into their email account.} | |
511 | 520 | \end{itemize} |
512 | 521 | |
513 | 522 | \item[Post-conditions] |
... | ... | @@ -515,73 +524,47 @@ if the token is correct. } |
515 | 524 | \begin{itemize} |
516 | 525 | \itemsep1pt\parskip0pt\parsep0pt |
517 | 526 | \item |
518 | - {The user's password is changed} | |
527 | + {The User's password is changed.} | |
519 | 528 | \item |
520 | - {The user can log in with the new password} | |
529 | + {The User can log in with the new password.} | |
521 | 530 | \end{itemize} |
522 | 531 | |
523 | -\item[Trigger]{User clicks ``Forgot Password'' button on the login page} | |
524 | - | |
525 | -\item[Workflow, requesting password reset] | |
532 | +\item[Trigger]{The User wants to log into the site but does not know their password.} | |
533 | +\item[Workflow] | |
526 | 534 | |
527 | 535 | \begin{enumerate} |
528 | 536 | \itemsep1pt\parskip0pt\parsep0pt |
529 | 537 | \item |
530 | - {The user shall click ``Forgot Password'' (or equivalent) button} | |
531 | -\item | |
532 | - {The client shall prompt the user for their current email} | |
533 | -\item | |
534 | - {The user shall submit their email address} | |
535 | -\item | |
536 | - {The client shall validate that the email address is formatted | |
537 | - correctly} | |
538 | -\item | |
539 | - {The client shall submit the email address to the server in a POST | |
540 | - request to /api/reset\_password with an ``email'' value} | |
541 | -\item | |
542 | - {The server shall check if an account exists with the email entered by | |
543 | - the user} | |
544 | -\item | |
545 | - {If no such account exists, the server shall return an error to the | |
546 | - frontend, which will display it to the user} | |
538 | +{The User clicks ``Forgot Password'' text on the login page} | |
547 | 539 | \item |
548 | - {If the account does exist, the server will:} | |
549 | -\end{enumerate} | |
550 | - | |
551 | -\begin{enumerate} | |
552 | -\itemsep1pt\parskip0pt\parsep0pt | |
540 | + {The frontend shall render the password reset page from the template requestpasswordreset.html.} | |
553 | 541 | \item |
554 | - {Create a new password reset token for the user} | |
542 | + {The User shall type in their email address for their account and click the "Reset" button.} | |
555 | 543 | \item |
556 | - {Send an email to the user with a link containing the token and the | |
557 | - user's ID} | |
558 | -\end{enumerate} | |
559 | - | |
560 | -\item[Workflow, resetting password] | |
561 | - | |
562 | -\begin{enumerate} | |
563 | -\setcounter{enumi}{8} | |
564 | -\itemsep1pt\parskip0pt\parsep0pt | |
544 | + {The frontend shall send a POST request to /api/request\_password\_reset/ from RequestResetController.js.} | |
565 | 545 | \item |
566 | - {The user shall click the link in the email and visit | |
567 | - /app/password\_reset} | |
546 | + {The backend shall check if an account exists with the email entered by | |
547 | + the User in views.py in function request\_password\_reset.} | |
568 | 548 | \item |
569 | - {The client shall render a form that will prompt the user for a new | |
570 | - password} | |
549 | + {The backend shal send an email to the User with a link to the password reset page in models.py in function | |
550 | + request\_password\_reset.} | |
571 | 551 | \item |
572 | - {The user shall provide a new password in the form} | |
552 | + {The User will navigate to their email account, open the email, and click the link.} | |
573 | 553 | \item |
574 | - {The client shall submit the password to the server} | |
554 | + {The frontend shall render the password reset page from the template resetpassword.html.} | |
555 | +\item | |
556 | + {The User shall type in their new password and re-type it to confirm it.} | |
557 | +\item | |
558 | + {The frontend shall check if the new password is long enough and if the confirmed password is the same as | |
559 | + the new password in ResetPasswordController.js.} | |
575 | 560 | \item |
576 | - {If the user tries to submit without a password in the text field, the | |
577 | - client shall display a message saying ``Password cannot be blank.''} | |
561 | + {The frontend shall send a POST request to /api/reset\_password from ResetPasswordController.js.} | |
578 | 562 | \item |
579 | - {The server first verifies that the token is valid for the user} | |
563 | + {The backend shall change the user's password in views.py in function reset\_password.} | |
580 | 564 | \item |
581 | - {The server then verifies that the user's new password is non-blank} | |
565 | + {The frontend shall redirect the User to the login page. } | |
582 | 566 | \item |
583 | - {If neither of the above verifications fail, the server shall change | |
584 | - the password associated with the user's email. } | |
567 | + {The User shall use their new password to login to the application.} | |
585 | 568 | \end{enumerate} |
586 | 569 | \end{description} |
587 | 570 | \newpage |
... | ... | @@ -609,7 +592,7 @@ Login} |
609 | 592 | \\ |
610 | 593 | \item[Priority Level]{``Should''} |
611 | 594 | |
612 | -\item[Status]{Not Implemented} | |
595 | +\item[Status]{Implemented} | |
613 | 596 | |
614 | 597 | \item[Pre-conditions] |
615 | 598 | |
... | ... | @@ -627,8 +610,8 @@ Login} |
627 | 610 | {Only those users who were whitelisted may add the class.} |
628 | 611 | \end{itemize} |
629 | 612 | |
630 | -\item[Trigger]{The instructor emails the administrator and requests to | |
631 | -limit access to his class.} | |
613 | +\item[Trigger]{The course instructor wants to limit the students who | |
614 | +can add his class on our application.} | |
632 | 615 | |
633 | 616 | \item[Workflow] |
634 | 617 | |
... | ... | @@ -643,10 +626,10 @@ limit access to his class.} |
643 | 626 | paste the list of emails. They submit the page directly (no separate |
644 | 627 | frontend here) to the server.} |
645 | 628 | \item |
646 | - {The server shall create a WhitelistedAddress for each provided email, | |
629 | + {The backend shall create a WhitelistedAddress for each provided email, | |
647 | 630 | attaching it to the section taught by the instructor.} |
648 | 631 | \item |
649 | - {The server shall add any existing users whose email addresses appear | |
632 | + {The backend shall add any existing users whose email addresses appear | |
650 | 633 | in the whitelist to the class. } |
651 | 634 | \end{enumerate} |
652 | 635 | \end{description} |
... | ... | @@ -655,13 +638,13 @@ limit access to his class.} |
655 | 638 | \subsection{[A8] User Logout} |
656 | 639 | |
657 | 640 | \begin{description} |
658 | -\item[Description]{The user shall be able to log out of his/her account on | |
641 | +\item[Description]{The User shall be able to log out of his/her account on | |
659 | 642 | the site.} |
660 | 643 | |
661 | -\item[Desired Outcome]{The user's information and data will no longer be | |
644 | +\item[Desired Outcome]{The User's information and data will no longer be | |
662 | 645 | accessible after logging out. } |
663 | 646 | \\ |
664 | -\item[User Goals]{The user is done with his/her session of using the | |
647 | +\item[User Goals]{The User is done with his/her session of using the | |
665 | 648 | website, and wants to make sure others cannot access the data in his/her |
666 | 649 | account.} |
667 | 650 | |
... | ... | @@ -677,16 +660,18 @@ account.} |
677 | 660 | |
678 | 661 | \item[Post-conditions]{}{The user's data can no longer be accessed.} |
679 | 662 | |
680 | -\item[Trigger]{User clicks ``Logout'' button} | |
663 | +\item[Trigger]{The User no longer wants to be logged into the application.} | |
681 | 664 | |
682 | 665 | \item[Workflow] |
683 | 666 | |
684 | 667 | \begin{enumerate} |
685 | 668 | \itemsep1pt\parskip0pt\parsep0pt |
686 | 669 | \item |
687 | - {The server logs the User out using the Django logout feature} | |
670 | + {The User clicks the 'Logout' button in the upper right hand corner.} | |
671 | +\item | |
672 | + {The backend shall log the User out using the Django logout feature.} | |
688 | 673 | \item |
689 | - {Front-end displays application login page} | |
674 | + {The frontend renders the application login page using login.html.} | |
690 | 675 | \end{enumerate} |
691 | 676 | |
692 | 677 | \end{description} |
... | ... | @@ -698,12 +683,12 @@ account.} |
698 | 683 | \subsection{[A9] Contact Admin} |
699 | 684 | |
700 | 685 | \begin{description} |
701 | -\item[Description]{The user shall be able to contact the admin.} | |
686 | +\item[Description]{The User shall be able to contact the admin.} | |
702 | 687 | |
703 | -\item[Desired Outcome]{The user shall send a message to the admin; the | |
688 | +\item[Desired Outcome]{The User shall send a message to the admin; the | |
704 | 689 | admin shall receive the message.} |
705 | 690 | |
706 | -{User Goals:}{The user sends a message to the admin.} | |
691 | +{User Goals:}{The User sends a message to the admin.} | |
707 | 692 | |
708 | 693 | \item[Primary Actor]{User} |
709 | 694 | |
... | ... | @@ -711,21 +696,31 @@ admin shall receive the message.} |
711 | 696 | \\ |
712 | 697 | \item[Priority Level]{``Must''} |
713 | 698 | |
714 | -\item[Status]{Not implemented} | |
699 | +\item[Status]{Implemented} | |
715 | 700 | |
716 | -\item[Pre-conditions]{None.} | |
701 | +\item[Pre-conditions]{The User has an account registered and is logged in.} | |
717 | 702 | |
718 | 703 | \item[Post-conditions]{The admin receives the user's message.} |
719 | 704 | |
720 | -\item[Trigger]{User has navigated to our website. } | |
705 | +\item[Trigger]{The User wants to contact the adiminstators of the site with | |
706 | +bug reports, questions, or praise. } | |
721 | 707 | |
722 | 708 | \item[Workflow] |
723 | 709 | |
724 | 710 | \begin{enumerate} |
725 | 711 | \itemsep1pt\parskip0pt\parsep0pt |
726 | 712 | \item |
727 | - {The frontend displays the admin email address on every page in the | |
728 | - application.} | |
713 | + {The User shall click the '?' button that presents a toast reading "Help" when the User hovers over it.} | |
714 | +\item | |
715 | + {The frontend shall render the page using the help.html template.} | |
716 | +\item | |
717 | + {The User shall scroll to the bottom of the page.} | |
718 | +\item | |
719 | + {The User shall click the text reading "Send Us an Email!"} | |
720 | +\item | |
721 | + {The frontend shall open Microsoft Outlook or a similar application using the HelpController.js.} | |
722 | +\item | |
723 | + {The User shall see our email address in the recipients text box.} | |
729 | 724 | \end{enumerate} |
730 | 725 | \end{description} |
731 | 726 | \newpage |