< 012022-06-02⋎03 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
16:02paul121[m]dev call happening now!
16:03symbioquine[m]I'll be on in about 2 minutes :)
16:03mstenta[m]ah! forgot!
17:16paul121[m]Cool Hylo + OpenTEAM news (tbh I still haven't used hylo myself, but maybe this will finally motivate me): medium.com/terran-collective/community-i
17:16paul121[m]> We have created our first custom group type on Hylo — Farms! Farms can be created through our API integration with OpenTEAM, by filling out a quick survey on OpenTEAM’s open source tool, SurveyStack. With the producer’s consent, rich data from the survey is then populated into a beautiful farm profile page on Hylo, offering a way for land stewards to communicate about their operation — their goals, products, land management
17:16paul121[m]practices, needs and the types of connections they are open to. Farm profiles offer a way for land stewards to build relationships with each other, benefit from peer-to-peer support, and connect with purchasers and the public.
20:29symbioquine[m]Is there a good way to prevent config entities defined through Yaml from being deleted while still allowing them to be enabled/disabled?
20:30mstenta[m]Hmm that's a good question
20:30mstenta[m]Maybe not in Drupal core itself
20:30symbioquine[m]I guess I need to define my own permission provider to decorate \Drupal\entity\EntityPermissionProvider?
20:30mstenta[m]Have you used the Config Update UI module at all?
20:31symbioquine[m]I don't think so
20:31mstenta[m]It will show you "missing config" so it provides some functionality for detecting installed/deleted config
20:31mstenta[m]eg: if you delete a config
20:31symbioquine[m]ah
20:31symbioquine[m]I guess that might make it fine for users to delete my default config entities - if they can just use that tool to get them back...
20:32mstenta[m]yea... or you provide your own UI to restore them which mimics that...
20:32mstenta[m]the config update ui is def advanced
20:32mstenta[m](and not accessible on farmier for that reason, fwiw)
20:33symbioquine[m]ah
20:33mstenta[m]it's basically an extension of drupal core's config management ui, which gives admin the ability to import/overwrite ANYTHING
20:34mstenta[m]not sure your exact needs, but might make more sense to just make your own layer on top to "disable" things... without actually deleting config
20:35mstenta[m]leave the config/"installed module" at a lower level
20:35symbioquine[m]Yeah, maybe I should just make it harder to delete them via the UI and if somebody goes out of their way to do so, they can always use advanced tools to put it back.
20:37mstenta[m]yea - i think i like the "disable the module to remove it entirely" approach, and then a secondary UI for enabling/disabling withing your app
20:37mstenta[m]that's kinda how i expected field kit to do it
20:37mstenta[m]because you may also want more levels of control (like we talked about w/ field kit)... eg: per-user
20:38mstenta[m]are you familiar with the `dependencies.enforced` yml mechanism?
20:38mstenta[m]* the `dependencies.enforced.module` yml
20:39mstenta[m]eg: github.com/farmOS/farmOS/blob/a8b528cdd9
20:39symbioquine[m]Yeah, users can still add/remove/disable plugins in Asset Link (assuming the plugin management plugin is enabled), but the site admin can configure which plugins users get served by default. That's the part I'm working on now.
20:39mstenta[m]oh cool gotcha
20:39symbioquine[m]Those default plugins either come along with Asset Link or another module - or are added manually by URL
20:39mstenta[m]gotcha yea
20:40mstenta[m]could you break them all out into separate submodules?
20:40mstenta[m]then it would just be enabling/disabling modules
20:40symbioquine[m]the site admin should be able to delete those plugins they've added, but only disable/enable the plugins which come from modules.
20:40mstenta[m]using `enforced` dependencies will delete the config when the module is uninstalled
20:40symbioquine[m]That's cool
20:41symbioquine[m]Seems a bit heavy-weight to make them all modules though...
20:41mstenta[m]yea... maybe. but i don't think it has any real performance impact
20:41mstenta[m]definitely "feels" that way though, i agree :-)
20:42mstenta[m]just sayin'... drupal already provides this "turn on/off" feature w/ modules :-)
20:42mstenta[m]but if you're talking about tons of plugins... maybe it's overkill
20:43mstenta[m]on the other hand, maybe just a very simple router+form that shows a set of checkboxes next to each, so they can be disabled, and that just gets stored in a single "simple settings" config
20:44mstenta[m](default to all enabled)
20:44mstenta[m]and then that gets used to determine which ones to send to the client
20:58symbioquine[m]<mstenta[m]> "but if you're talking about tons..." <- Yeah, there'll probably be a lot in the long run
21:21symbioquine[m]<mstenta[m]> "on the other hand, maybe just..." <- I'm liking how the config entity version is working. I think I might make the UI code add a flag to the entities that were defined via the UI and make a `AccessInterface` implementation that only allows access to the delete route for the entities with that flag.
21:21symbioquine[m]Thanks for the tip about the `enforced` trick, that'll be useful for the docs on contrib modules that provide Asset Link plugins.

< 012022-06-02⋏03 >