crkn-rcdr / sapindale

Sapper/Svelte access platform administration interface
2 stars 2 forks source link

Lookup slugs many and early for ArchivalManifest and other tools. #117

Closed RussellMcOrmond closed 3 years ago

RussellMcOrmond commented 3 years ago
RussellMcOrmond commented 3 years ago

My hope is that @SaschaAdler and @DivyaKrishnan26 can take a look at bf31758f1087b95220159b4b5765e55adfe67eba

What I am trying to do is enhance Slug/Resolver to support sameSlug being passed in. It didn't seem to ever set the slug value if the value and sameSlug were equal and not empty. That meant the "Slug in use" was never displayed.

There may be a better way to support this, and the logic of this fix/feature should probably be moved over to Divya's PR (I would revert from this PR once Divya's has been merged). I also don't know what the appropriate way to ensure a test case exists for these types of things whenever we change components..

I also don't think the type key in returns has any meaning, given the slug view no longer returns a value. If some specific function wants to find out what type of document is behind a slug then they will need to use the noid and do a separate lookup.

RussellMcOrmond commented 3 years ago

I've deliberately not included the actions for /dipstaging/updates.json.js that update CouchDB, as I wanted to get feedback first.

@SaschaAdler should let me know what types of changes he would like to see. I'm not sure if offering such direct CoudhBD access for staff tools is what is intended at this point, or we want to let the more abstracted work be later.

SaschaAdler commented 3 years ago

I can't imagine we don't want posts to the Sapindale server performing CouchDB updates, as even with the Accessor abstraction that's effectively what's happening. Any and all requests will be authorized by their cookie first, and so we can feel fairly comfortable about the default security of things.

I'll have a longer look at your actual code sometime soon.