| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This would be nice to have but I see some issues with the current implementation. AclHelper is a nice tool to test some things out, but would definitely need to be improved if it would be used in the actual server source. But I would solve the problem here using that tool. For one it tightly couples pod seeding to WAC authorization, which means this would not work with ACP (#1433). CSS already has a class to copy files into a pod, that is how it fills in a pod when created: the TemplatedResourcesGenerator. See for example CommunitySolidServer/src/init/ContainerInitializer.ts Lines 61 to 71 in b3da9c9 My suggestion would be to use that generator instead, and instead of setting the permissions through the JSON document require the correct authorization resources to also be in the data folder, similar to how they are in the templates/pod folder in CSS. The SeededPodInitializer would then call this class to generate the necessary resources. One issue is that the TemplatedResourcesGenerator takes it source folder as a constructor parameter whereas in this case it differs for every call so something would need to be changed. My first thought was to have an interface that extends the ResourcesGenerator generator where the generate function takes an additional optional parameter that points to the template folder, similar to how the template engines do it internally. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is in draft status as I need to add tests. I would appreciate feedback on the API for file seeding (documented here) so that I can make any relevant changes before writing the tests.
📁 Related issues
✍️ Description
This PR allows data files to be added to Pods as part of the seeding process
✅ PR check list
Before this pull request can be merged, a core maintainer will check whether