Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't let guest user to change name
Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
  • Loading branch information
Tomin1 committed Aug 11, 2020
1 parent af9170a commit 447639c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/usermodel.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 447639c

Please sign in to comment.