Added an ApplicationGroup system to track the multiple sessions open by a user

This commit is contained in:
emeric
2018-06-22 13:10:19 +02:00
parent ed008533b2
commit c427396623
13 changed files with 274 additions and 71 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ class UserModel : public Wt::WFormModel
Wt::Auth::User authUser = LmsApp->getDb().getUserDatabase().findWithId( std::to_string(*_userId) );
Database::User::pointer user = LmsApp->getDb().getUser(authUser);
if (user == LmsApp->getCurrentUser())
if (user == LmsApp->getUser())
throw std::runtime_error("Cannot edit ourselves");
auto bitrate = getBitrateLimitRow(user->getMaxAudioBitrate());
+1 -1
View File
@@ -75,7 +75,7 @@ UsersView::refreshView()
entry->bindString("name", authUser.identity(Wt::Auth::Identity::LoginName), Wt::TextFormat::Plain);
// Don't edit ourself this way
if (LmsApp->getCurrentUser() == user)
if (LmsApp->getUser() == user)
continue;
entry->setCondition("if-edit", true);