From 447639c73f4ee2666730d75613a881c2cf736310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Lepp=C3=A4nen?= Date: Tue, 11 Aug 2020 10:54:52 +0300 Subject: [PATCH] Don't let guest user to change name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomi Leppänen --- src/usermodel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/usermodel.cpp b/src/usermodel.cpp index aa5f2c5..7158f04 100644 --- a/src/usermodel.cpp +++ b/src/usermodel.cpp @@ -212,6 +212,10 @@ bool UserModel::setData(const QModelIndex &index, const QVariant &value, int rol return false; UserInfo &user = m_users[index.row()]; + + if (user.type() == UserInfo::Guest) + return false; + switch (role) { case NameRole: { QString name = value.toString();