[dolphin] [Bug 498428] New: Empty Share tab in Dolphin on non-local account

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Thu Jan 9 13:40:24 GMT 2025


https://bugs.kde.org/show_bug.cgi?id=498428

            Bug ID: 498428
           Summary: Empty Share tab in Dolphin on non-local account
    Classification: Applications
           Product: dolphin
           Version: 21.12.3
          Platform: Kubuntu
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: dolphin-bugs-null at kde.org
          Reporter: matthias.ziehm at gmail.com
                CC: kfm-devel at kde.org
  Target Milestone: ---

SUMMARY
The "Share" tab in folder properties is empty preventing me from creating a
samba share this way using a non-local login user.
When starting dolphin from the console the following error appears when
switching to the "Share" tab:
> qrc:/org.kde.filesharing.samba/qml/main.qml:39: TypeError: Cannot read property 'inSamba' of null

To me it looks like the current user has no entry in userManager, which traces
to usermanager.cpp::getUsersList() and therein line 47:
>const QStringList userNames = KUser::allUserNames();
not adding all user names, but likely only user names of local users.
Clearly at least the current user should always be part of a users listing
(even if this user is non-local (e.g. via LDAP, Kerberos or MS Active
Directory).
Which should prevent this bug, but the not listing of the current user in a
allUserNames() function could cause problems at other places to.

SUGGESTED FIX:
In samba/filepropertiesplugin/usermanager.cpp::getUsersList()
- const QStringList userNames = KUser::allUserNames();
+ const QString currentUserName = KUser().loginName();
+ QStringList userNames = KUser::allUserNames();
+ if (!userNames.contains(currentUserName))
+   userNames.append(currentUserName);
or fix in KUser::allUserNames() (However, KUser seems to be archived)!
or follow this patch for samba/filepropertiesplugin/usermanager.cpp::load():
https://git.altlinux.org/tasks/archive/done/_295/302164/gears/100/git?p=git;a=blob;f=alt-share-under-domain-user.patch;h=e2baab57b2f2d1f7618c991bc904817a1e2e9f61;hb=b14e583fcde4c7f569f0c8c0de70f8d6e5ff7cbd

STEPS TO REPRODUCE
1. Open Dolphin in a KDE session of *non-local* user
2. Right click on a file or folder & Select "Properties"
3. Switch to tab "Share"

OBSERVED RESULT
The share tab is empty

EXPECTED RESULT
the share tab offers options to share the folder

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.04.5
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
I believe this bug is likely the same underlying bug as these reports in
differing setups or versions.
https://bugs.kde.org/show_bug.cgi?id=467176
https://bugs.kde.org/show_bug.cgi?id=469318
https://bugzilla-altlinux-org.translate.goog/show_bug.cgi?id=42703&_x_tr_sl=auto&_x_tr_tl=en

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list