Hacker Newsnew | past | comments | ask | show | jobs | submit | bryantgillespie's commentslogin

You can certainly add whatever logic you want / need using custom hooks in Directus.

Here's the docs for custom hooks. https://directus.io/docs/guides/extensions/api-extensions/ho...

But honestly, depending on the complexity of your logic you may not even need custom hooks. You can get really granular with the built-in access policies and permissions.

As long as you have relationships configured with the user collection you can reference those in your permissions.

Here's an example rule for accessing items within a `projects` table that hides any projects that don't belong to the current agency partner.

{"_and":[{"partner":{"id":{"_eq":"$CURRENT_USER.agency_partner_id.id"}}}]}

Each project a many to one relationship to agency_partners. Each user has a many to one relationship to agency_partners.

You can even scope this down to allow / hide specific fields if you want.


I wrote my own extension in version 9 some time ago where I used hooks to track changes and sync our Full-Text Search engine (Meilisearch). I just remembered some of the difficulties dealing with hooks, because their payload differed in structure depending on how data entries were mutated (update via Web-UI VS creation via API VS import via API /utils/import). Has that improved?


Almost forgot - full disclosure - Bryant here from the Directus core team.


Sorry for any confusion. When you say title do you mean the title of the post here on HN? Or like the title of the page or video on the website?


The one you have control over…


Hi folks - looking to get some real feedback outside of my own team / circle here - good, bad, ugly - whatever.

I'm a developer advocate at a startup. Over the last few months my team and I have been working hard to build and launch our own little content hub. We wanted to create a bunch of shows that developers find entertaining and educational.

We've gotten some really solid feedback about several of the shows but one there's one I'm on the fence about continuing. We'll start recording the next round soon and I'm need to decide whether it's worth spending more time on this particular one.

It's a parody of the old Saturday Night Live skit - Deep Thoughts by Jack Handy. So it's a very very very (haha) dry style of humor.

Of course, I think it's funny and I had a blast recording the episodes. But I'm also a mid-30s dad of three little girls so I wouldn't really call myself a "tastemaker" . I'm worried a lot of the context is lost if you're not familiar with that SNL skit.

So my question is – is this actually funny to you? Does it resonate? Or does it just miss the mark? Waste of time to record more episodes?

Thanks in advance! Bryant G


It's not exactly hilarious. There's a germ of a good idea.

I think it may need tightening. The "Jack Handy" concept is deliberately slow, so you need to make each word count.

If you delivered the same gag as stand up it would take just a few seconds. As it is there's no build and no payoff to the parody of low-key motivational vid.


Thanks! Exactly the type of feedback I was after.

You feel it's the joke / script that needs tightening? or the actual delivery?


The delivery pace is dictated by the format. I might tighten it a bit but it's effectively doing the thing it's aiming for.

Which means that the text needs to be tightened within an inch of its life. That's tricky to do right.


Agreed. Thanks for clarifying.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: