Command Manager GetCommands modified so that it does not attempt to create an instance of an abstract class (AdminCommand)
@heatherbshapiro's /addadmin and /removeadmin can be tested in this branch
BroadcastCommand brought over and implemented.
Testing Use Cases
Open SQL Server Object Explorer > (localdb)\ > Databases > JabbREFTest > dbo.AspNetUsers > ViewData (right click)
Find a user you would like to make an admin
Change the IsAdmin value from 'False' to 'True'
Update the database (top left refresh button) to ensure the change has been accepted.
Start the project
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)
This works the way Kevin described. /broadcast shows up for multiple browsers! now we just gotta get that functionality into private messages :p :shipit:
Testing Use Cases
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.