Added an ApplicationGroup system to track the multiple sessions open by a user
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user