wainuiomata / sambal

Experimental web admin for Samba and Active Directory domains
https://wainuiomata.com
GNU General Public License v3.0
1 stars 1 forks source link

Question whether RootFactory should construct nested Resources or not #35

Closed robvdl closed 8 months ago

robvdl commented 8 months ago

This seems to trigger it to load everything from the domain when visiting "/", which totally makes sense.

The view for the RootFactory context (src/sambal/views/domain.py, root_view) mitigates this by just showing the nested resource keys only.

Perhaps the RootFactory itself could already be doing this, it might avoid fetching the nested data.

Although in testing, performance hasn't been a problem, I have no ideas how large some domains can get either.

robvdl commented 8 months ago

I think it doesn't make sense to not return Resource or it can't traverse. I think this is just the way it's mean to work.

I think listing only the keys in the root_view is a nice touch though, I'll leave that.