MachUpskillingFY17 / JabbR-Core

Modern edition of JabbR chat client using .NET Core
MIT License
7 stars 8 forks source link

Kevin/admincommand #294

Closed kevinleung23 closed 7 years ago

kevinleung23 commented 7 years ago

Testing Use Cases

  1. Open SQL Server Object Explorer > (localdb)\ > Databases > JabbREFTest > dbo.AspNetUsers > ViewData (right click)
  2. Find a user you would like to make an admin
  3. Change the IsAdmin value from 'False' to 'True'
  4. Update the database (top left refresh button) to ensure the change has been accepted.
  5. Start the project
  6. Start two browsers running JabbR and log in with the admin and one nonadmin use

Admin = userA nonAdmin = userB Test /addadmin and /removeadmin 7a. With userA, run '/addadmin ' 8a. UI should show the changes made. 9a. Look at the database ViewData table and refresh the table. 10a. Ensure that the userB's 'IsAdmin' value is now 'True' 11a. With userB, run '/removeadmin ' (Admins can remove other admins) 12a. Check the database again and ensure the changes are reflected 13a. Try different variations of this and try to break the logic.

Test /broadcast 7b. With any admin user, run '/broadcast Broadcast test message!!' 8b. Regardless of which chatroom other users are in, they should see this broadcast (Admin or not)

thanks.

ashanhol commented 7 years ago

This works the way Kevin described. /broadcast shows up for multiple browsers! now we just gotta get that functionality into private messages :p :shipit: