Moonshine-IDE / Super.Human.Portal

Portal interface to show documentation for DominoVagrant and Super.Human.Installer
Other
0 stars 1 forks source link

Automatically Add Genesis Directory Instance for genesis-directory App #38

Closed JoelProminic closed 10 months ago

JoelProminic commented 10 months ago

As part of #35, we would like to automatically create a document in the new Genesis Directory interface when installing the genesis-directory application from Super.Human.Portal.

JoelProminic commented 10 months ago

The original plan was to create this through the Genesis JSON tool. The JSON would look something like this (the ACL section can be deleted if needed - it is included as an example):

{
    "title": "Creating a GenesisDirectory document in SuperHumanPortal.nsf for genesis-directory application",
    "versionjson": "1.0.0",
    "steps": [
        {
            "title": "--- Import documents ---",
            "databases": [
                {
                    "filePath": "SuperHumanPortal.nsf",
                    "action": "update",
                    "documents": [
                        {
                            "action": "create",
                            "computeWithForm": true,
                            "items": {
                                "Form": "GenesisDirectory",
                                "label": "GenesisDirectoryDefault",
                                "url": "https://domino.demo.startcloud.com/gc-p.nsf",
                                "password": ""
                           }
                        }
                    ],
                    "ACL": {
                        "roles": [
                            "role1",
                            "role2"
                        ],
                        "ACLEntries": [
                            {
                                "name": "username",
                                "level": "manager",
                                "type": "person",
                                "canCreateDocuments": true,
                                "roles": [
                                    "role2"
                                ]
                            }
                        ]
                    }
                }
            ]
        }
    ]
}

We could consider adding this to the genesis-directory task directly in the central Genesis server. However, this would create a direct dependency on SuperHumanPortal.nsf (and the superhumanportal app, which I can't find at the moment).

JoelProminic commented 10 months ago

However, on further consideration, I think it is easiest in the short-term to just add custom logic to GenesisInstall which will trigger for the genesis-directory app. This will create the required document directly. We can improve this design later, but it should be sufficient for @JustinProminic to do a demo.

JoelProminic commented 10 months ago

I implemented this update here. This has been working well in my testing, so I'm closing the issue.