user(user_id integer pkeyname text-- other attributes)user_right(id integer pkeyuser_id integer fkey(user, user_id)object_id textrights unsigned integer)
QHash<QString, uint> rights;while(query.next()) rights.insert(query.value(0), query.value(1));
foreach (stringObjectName, Objects) { if (rights.value(stringObjectName) & RIGHT_WRITE) { addToWriteUI(); } else if (rights.value(stringObjectName) & RIGHT_READ) { addToReadUI(); } else if (rights.value(stringObjectName) & RIGHT_EXECUTE) { addToExecuteUI(); }}