Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync the files in Kernel/Config/Files/User when S3 syncing is active #1776

Closed
bschmalhofer opened this issue May 12, 2022 · 5 comments
Closed
Assignees
Milestone

Comments

@bschmalhofer
Copy link
Contributor

There is still another set of config cache files in Kernel/Config/Files/User. Presumably these files have to be treated like the ZZZ*.pm files. See the implementation in Kernel/System/SysConfig/Base/UserSetting.pm .

@bschmalhofer bschmalhofer added this to the OTOBO 10.1.5 milestone May 12, 2022
@bschmalhofer bschmalhofer self-assigned this May 12, 2022
bschmalhofer added a commit that referenced this issue May 17, 2022
No need to use $Param{TargetUserID} when there is $TargetUserID
bschmalhofer added a commit that referenced this issue May 17, 2022
bschmalhofer added a commit that referenced this issue May 18, 2022
Start using Test2::V0. No need to work with subroutine references.
bschmalhofer added a commit that referenced this issue May 18, 2022
before trying to load the user file from the file system
bschmalhofer added a commit that referenced this issue May 18, 2022
when saving an S3 object to file
bschmalhofer added a commit that referenced this issue May 18, 2022
start using subtests
bschmalhofer added a commit that referenced this issue May 18, 2022
@bschmalhofer
Copy link
Contributor Author

Applied a couple of fixes, regarding:

  • creating the directory Kernel/Config/Files/User
  • removing obsolete user config files not only in the file system, but also in S3

Tests look better now,

@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented May 19, 2022

Unittest look better now. Let's do a manual sanity check. Using the SysConfig setting Ticket::Frontend::PlainView as an example as per Kernel/Config/Files/XML/Ticket.xml is has UserModificationPossible=1 but UserModificationActive not set. The set up is Docker with two web containers, one daemon container, and /opt/otobo is not shared.

  • Create agent tina with rw in the group users
  • Check: directory User exists in neither of the two web container, nor in MinIO
  • Login as tina
  • No "Advanced" section in AgentPreferences
  • Log in as root@localhost
  • Allow user modification for Ticket::Frontend::PlainView

@bschmalhofer
Copy link
Contributor Author

Looks like allowing user modification of sysconfig settings is not really working. For a started, the Subaction UserModified seems to be not implemented in Kernel/Modules/AdminSystemConfiguration.pm .

@bschmalhofer
Copy link
Contributor Author

Syncing User files seems to work. Support in the WebApp is questionable, see #1788. Closing this issue.

@bschmalhofer
Copy link
Contributor Author

The code for removing no longer needed User config files looks broken too. The subdirectory 'User/' must be included when checking in S3.

             # user specific overrides of the SysConfig
             # note that POSIX does not allow to match multiple digits, so we need an extra filter
-            push @ObsoleteFiles, grep
-                { !$SubPath2Properties{ basename($_) } }
-                grep
-                { m!/\d+\.pm^! }
+            push @ObsoleteFiles,
+                grep { !$SubPath2Properties{ 'User/' . basename($_) } }
+                grep { m!/\d+\.pm^! }
                 glob "$Self->{Home}/Kernel/Config/Files/User/[0-9]*.pm";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant