1. 21 Aug, 2020 1 commit
  2. 20 Aug, 2020 3 commits
    • Harald Sitter's avatar
      rejigger acl page and add a sheet to be shown when using a denial · 6e7878af
      Harald Sitter authored
      denials always win so they shouldn't really be used unless one is
      suuuuuuuuuuuuper sure about it.
      to that end we'll throw up a warning that tries to explain that denials
      probably aren't what the user wants and also that denying usually isn't
      necessary because filesystem permissions still apply, so even when using
      a liberal share ACL the filesystem ACL would still prevent other users
      from reading one's private data for example
      this was a bit awkward to implement because sheets need to overlay
      something yet overlaying the columnlayout messes with the layout size
      itself compacting the tableview away.
      equally we cannot use a regular page because pages come with a whole
      bunch of padding that looks very weird here and I've not found a way to
      disable it either. instead we now have a new toplevel item which merely
      acts as the thing the sheet can overlay. the item then contains the
      previous layout and elements so they retain the sizing even when
      BUG: 422554
      FIXED-IN: 20.12
    • Harald Sitter's avatar
      fix up ACE ordering · f3c12f12
      Harald Sitter authored
      the order of entries within the ACL have meaning as samba aborts
      permission lookup on matching denials but combines read and full access.
      since our ACL table mimics windows' we'll follow its behavior as it's
      also fairly easy to explain
      "a denial always denies, no matter what other rules exist"
      to that end we'll now sort the ACL to first list denials, then reads,
      then full access
      - if foo is denied they'll not be let in
      - if bar is read they get let in
      - if Everyone is denied nobody gets in
      should we later add group support this further becomes
      - if groupFoo is denied and bar is a member of it then bar is denied
      - if groupBar is read and foo is a member of it then foo is still denied
      - if groupFoo is fullacces and bar is a member they'll get fullaccess
      CCBUG: 422554
      FIXED-IN: 20.12
    • Harald Sitter's avatar
      repair share path handling · 3bfb749e
      Harald Sitter authored
      this fell over in the refactor so make it a bit more streamlined. the
      context now gets a URL (file:///home/foo) and feeds that into the
      resolveShare which constructs a path from it (/home/foo) to then feed to
      ksambashare (which exclusively deals with local paths).
      the path on the share instance is then the path to always use. to aid
      with that we'll stop holding the url as a member
      this unbreaks creating new shares which had no path set (this is now
      done in resolveShare). also print that on applyChanges for easy
  3. 19 Aug, 2020 1 commit
    • Harald Sitter's avatar
      port to qml and refactor to somewhat isolated pages · ba43b8e9
      Harald Sitter authored
      this is in preparation to add more "wizardy" behavior for scenarios
      where samba isn't installed yet, such as adding the user to the samba
      the way the new ui works is that it's rendering a page stage, we push
      pages on as they become relevant. longer term that'll be at least the
      pages install->reboot->setpassword->acls
      this also features some related improvements such as
      - better const corectness for some member vars
      - less ifdef samba_install
      - the maximum share name is now capped at 60 characters (which is what
      windows10 allows)
      - there's a soft warning for the 60 character limit as well in the gui
  4. 17 Aug, 2020 1 commit
  5. 12 Aug, 2020 3 commits
    • Harald Sitter's avatar
      move to spdx · 35bf3684
      Harald Sitter authored
      as per new licensing policy
    • Harald Sitter's avatar
      various stylistic improvements · 8ab0514d
      Harald Sitter authored
      - use override instead of virtual; it implies virtual
      - use =default where possible
      - reduce slot lambda signatures to only used arguments
      - getUsersList is now static - it uses no members
      - reboot is now static - it uses no member
      - use auto when the right hand side of an assignment shows the type
      - make sure pointer members are init'd to nullptr lest we forget to
      declare them in the ctor
    • Harald Sitter's avatar
      give add/remove errors a GUI · 01a6bda3
      Harald Sitter authored
      previously we'd ignore the returned errors leaving the user hanging when
      adding a share fails and not even telling them why.
      we now route errors on add/remove through somewhat generic
      kmessagebox-based reporting tech.
      unfortunately this is fairly excessive WRT string mapping because
      ksambashare sports one enum for everything so API-wise a call to save()
      could return UserShareAclOk but in practice that of course cannot happen
      because that'd mean nothing. as such many of the strings are overly
      generic because they cannot practically appear on weak context actions
      like save().
      very meh.
      this depends on the new lastSystemErrorString() API in KIO to stringify
      the majority of failure scenarios here, which come out of samba's 'net'
      trying to share /tmp now produces a kmessagebox informing the user that
      the dir cannot be shared
      BUG: 334618
      FIXED-IN: 20.12
  6. 10 Aug, 2020 1 commit
  7. 15 Jul, 2020 1 commit
  8. 07 Jul, 2020 1 commit
  9. 18 Jun, 2020 2 commits
  10. 17 Jun, 2020 2 commits
  11. 13 Jun, 2020 1 commit
  12. 12 Jun, 2020 2 commits
  13. 08 Jun, 2020 1 commit
  14. 07 Jun, 2020 2 commits
  15. 02 Jun, 2020 2 commits
  16. 06 May, 2020 1 commit
  17. 30 Apr, 2020 1 commit
  18. 23 Apr, 2020 1 commit
  19. 22 Apr, 2020 1 commit
  20. 21 Apr, 2020 1 commit
  21. 09 Apr, 2020 2 commits
  22. 04 Apr, 2020 2 commits
  23. 27 Mar, 2020 1 commit
  24. 15 Mar, 2020 1 commit
    • Nate Graham's avatar
      Recommend rebooting after installing Samba · 8a104aa4
      Nate Graham authored
      After Samba is installed, very frequently it will not work correctly until the machine is
      rebooted. One potential reason is when the installed package has made group membership
      changes, which only take effect after a reboot.
      This patch implements a reboot recommendation along with a button to reboot the machine.
      Both are shown immediately after Samba has been installed.
      Because some expert users may understand the technical details of what's going on, the
      reboot is only recommended, not required. If the window is closed and then re-opened,
      the normal Samba sharing configuration UI is displayed instead of the reboot prompt.
      Added a new function rather than using a Lambda because it may be useful for additional
      purposes too (e.g. https://bugs.kde.org/show_bug.cgi?id=407846)
      FEATURE: 407845
      FIXED-IN: 20.04.0
      Test Plan:
      http://s1.webmshare.com/Ry55q.webm (not uploaded to Phab due to file size limit)
      1. Remove Samba
      2. Go to share a folder
      3. Click "Install Samba"
      4. After the installation has completed, click the "Restart" button and see that the machine reboots
      5. Remove Samba again
      2. Go to share a folder
      3. Click "Install Samba"
      4. Close the window and re-open it instead of rebooting as recommended
      5. See that the Samba sharing config UI is all there
      Reviewers: #vdg, #frameworks, #dolphin, apol, sitter
      Reviewed By: sitter
      Subscribers: anthonyfieroni, sitter, bruns
      Differential Revision: https://phabricator.kde.org/D21466
  25. 04 Feb, 2020 1 commit
  26. 28 Jan, 2020 3 commits
  27. 09 Jan, 2020 1 commit