Commit 34b03f0d authored by Leander Schulten's avatar Leander Schulten

UX: Usermanagment: You don't have to logout and login the current user to...

UX: Usermanagment: You don't have to logout and login the current user to apply the Permission changes in the UI
parent 506a6593
Pipeline #199625 passed with stage
in 6 minutes and 13 seconds
......@@ -167,6 +167,10 @@ bool UserPermissionModel::setData(const QModelIndex &index, const QVariant &valu
if (user->havePermission(p) != value.toBool()) {
user->setPermission(p, value.toBool());
emit dataChanged(index, index, {HavePermissionRole});
if (user == UserManagment::get()->getCurrentUser()) {
// the UserManagment.currentUser.havePermission(...) statements in qml should be reevaluated
emit UserManagment::get()->currentUserChanged();
}
return true;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment