< 172018-12-18⋎19 >

farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Feature requests and bug reports: github.com/farmOS/farmOS/issuesSet by ChanServ on 2018-08-16 at 14:32
12:13amonteclicworld[mstenta: is there a way of editing the API of Farm OS or adding an extension
12:22mstenta[m]Yes there's a lot of flexibility for altering and adding things via Drupal modules
12:22mstenta[m]What do you want to do?
12:23amonteclicworld[i want to add an account creation API extension
12:23amonteclicworld[so that users can create accounts through the API on our self Hosted FarmOS
12:24mstenta[m]Oh ok
12:24mstenta[m]That might be very easy actually
12:24amonteclicworld[Any direction you can give me
12:24amonteclicworld[You know its very big
12:25mstenta[m]Yeah take a look at this:
12:26mstenta[m]github.com/farmOS/farmOS/blob/7.x-1.x/mo
12:27amonteclicworld[Thanks
12:27mstenta[m]That file defines what entity types are accessible via the API to farm roles
12:27mstenta[m]the API itself is provided by this module:
12:27mstenta[m]www.drupal.org/project/restws
12:28mstenta[m]That module makes Drupal entities available via REST endpoints
12:28mstenta[m]"user" is an entity type in Drupal
12:29mstenta[m]So in other words: the user API already exists
12:29mstenta[m]You just need to grant permission to it
12:30mstenta[m]You can test it out yourself as user 1 (who has all permissions)
12:30mstenta[m]Try going to /user.json when you are logged in as user 1
12:30mstenta[m]You should see JSON listing of users
12:31mstenta[m](note: I've never tried this myself, but that is theoretically how it should work)
12:33mstenta[m]So that file I linked to first is just the way in which farmOS grants permission to certain entity types in the API to the farmOS roles (manager, worker, and viewer)
12:41amonteclicworld[so i will be able to create new accounts ?
12:49mstenta[m]you should be able to, yes
12:49mstenta[m]but i haven't tested it
12:49mstenta[m]users are just another type of entity, as far as Drupal is concerned, so I think that will be possible
12:50mstenta[m]although maybe the API works a little differently with regard to setting a password and other security considerations
12:50mstenta[m]Drupal also has some configurations for how user accounts can be created
12:50mstenta[m]for example: "Administrators only" would mean that only admins can create new users
12:51mstenta[m]but there is a setting that allows anyone to sign up for a new account, so you would probably need to enable that
12:51mstenta[m]i'm not sure if the rest api allows anonymous users to create account, however... it may not
12:52mstenta[m]there are a lot of security and access-permission considerations around doing this - so you'll have to dig into it and experiment to see what's possible - please document what you find and share it with the rest of the community so we can all learn! :-)
13:56amonteclicworld[Alright i understand, thanks and let me dive in
16:31paul121[m]Hello everyone! Wanted to introduce myself quick, my name is Paul - I just graduated with a degree in Comp Sci. This week I've begun working on a market farm in Western WA. The farm is quite interested in incorporating technology for a few things. Right now we're focusing on crop tracking, as well as assigning tasks to workers through their phones. Tasks that are connected to crops, at their current stage, in their
16:31paul121[m]respective locations. Could save a lot of managerial time
16:35paul121[m]Following FarmOS I thought it might be a good fit - now seeing the API and offline app in development, exactly what we're looking for.
16:35paul121[m]For what we want I think we may need to add/modify some logging modules, and perhaps customize the offline app to our needs.
16:35paul121[m]Soon I will have quite a bit of time on my hands...would love to contribute what I can. @mstenta:matrix.org mentioned @jgaehring and Alex are working on this. What's the best way to get in touch?
16:37paul121[m]I've tried building the native app but ran into problems with docker - haven't had time to pursue further. Think I need to upgrade OS. Getting that far is well documented, though! Cheers..
17:01mstenta[m]paul121: Welcome!
17:02mstenta[m]Yea, jgaehring is leading the charge on the native app.
17:02troym541[m]amonte@clic.world: amonte@clic.world Regarding REST integration I found the following video very useful. www.youtube.com/watch?v=a2nHIWlCXSw&t=18 You will need to get some type of REST Client like Postman to test it out.
17:03mstenta[m]paul121: The native app is currently going through some changes, as part of a sponsored sprint - I'd recommend checking out the issue queues in both of those repos to get a sense of things.
17:04mstenta[m]And feel free to add new issues/feature requests/questions etc there

< 172018-12-18⋏19 >