I need a way to pass data from the
# package-development
m
I need a way to pass data from the server to my v14 entry point - I guess it would be possible to solve with a API call and then register manifests after this but wondering if there's something similar to the "server variables"-thing we used to have before?
j
We have put the few server variables we need into Configuration endpoints
m
Okey! So I would basically do the same then? Wait for API call to come back before registering?
j
hope to eventually eliminate a bunch of them
m
Maybe not great if all packages need to have this pattern
Would be better with a single call where people can hook in if possible
j
well, I dont know your use case of course, but our extensions dont depend on server variables, it's more like booleans for different handling inside elements
m
My user case is: Does user X have access to feature Y
Data is on the server when the backoffice loads
j
A single call that exposes "data" would be a trash bin for everything
You can add permissions to a user
We tried to postpone the migration of the ServerVariables as long as we could to see if we really needed them (for our Core features), and turns out we didn't need most of them. The rest went into a configuration endpoint for Documents, Media and Packages, I think
m
I know about the "old" permissions (used e.g for "Publish", "Move", and so on) but in my use case it more like "User X is allowed to Publish,Move,Copy Thing A and not Thing B while user Y can Publish,Move and Copy anything. Is this supported in the that API?
j
More and smaller network requests are better than one big data dump, IMHO
m
I don't mind making a API call 😄 But I feel that the initial load of the backoffice (without any cache) is already slow so I wanted to check if there was any best pratice around this kind of things.
j
No, granular permissions are supported for documents but not "other stuff" yet
m
I noticed 1700+ requests so more and smaller indeed 😄
j
Yes, we are essentially DDoS'ing the backend with the client, haha
Well, for user permissions is now just a key/value store, so you can add your own granular permissions I suppose
you'd need to build the UI for it
m
I kind of already have everything so I guess I just wanted to check about if there was a recommended way to approach it 😄
j
we need to optimise the frontend code with a bundler at some point
m
Totally fine with ditching server variables - I noticed that the Workflow source had some kind of solution for it so I'll gather some inspiration and find a solution 😄
j
Yes, sometimes it's easier to just get the data out there 🙂
m
Yeah, compared a cold boot of v13 vs v14 beta002 today just for fun at the difference is massive
Some kind of bundling sounds like a great idea 😄
2 Views