function WequalWeb.AshAdmin.PageLive.__live__/0 is undefined

Hello! I'm trying to setup AshAdmin but I'm getting this error when I try to open the /admin route. Any idea on what could be going on? Thanks!
10 Replies
ZachDaniel
ZachDaniel3y ago
Hmmm Oh, it’s a scope Put your admin stuff in its own scope, because you’re using a scope in the router it’s prefixing your scope with the module
nkr
nkrOP3y ago
Did I miss something again? hehe ohh I need a new scope
ZachDaniel
ZachDaniel3y ago
And if you’re trying to out it at a path, like /dev do ash_admin prefix: “/dev” so it knows that it’s not served at ”/“
nkr
nkrOP3y ago
Thats it! Thanks Zach Now I need to figure out how to make specific users admins
ZachDaniel
ZachDaniel3y ago
Just remember, the admin UI is currently an “all or nothing super admin UI” So while you can give only admins access, there isn’t support for like granular user access
nkr
nkrOP3y ago
I see, also apparently theres a resource I didnt add the extension to and its showing on the admin UI anyways
ZachDaniel
ZachDaniel3y ago
Yeah, I believe resources show by default As long as an API they are in is shown I have some updates to make to support setting the logged in user to the current actor, but at the moment the admin panel does authorize?: false to allow anyone with access to do anything.
nkr
nkrOP3y ago
Dont even need to flag some user as admin or anything like that, they will have access anyways?
ZachDaniel
ZachDaniel3y ago
If they can get into the admin UI, yes. So what people will generally do is put a plug to redirect to sign in if the user isn’t signed in as an admin. As you’d still want to add an attribute to your user resource to track this And then toggle it for people who should have admin access, then reject access with a plug
nkr
nkrOP3y ago
Oh so I need to manually add an attribute and such, gotcha Thanks \o/

Did you find this page helpful?