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
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
Did I miss something again? hehe
ohh
I need a new scope
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 ”/“
Thats it!
Thanks Zach
Now I need to figure out how to make specific users admins
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
I see, also apparently theres a resource I didnt add the extension to and its showing on the admin UI anyways
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.Dont even need to flag some user as admin or anything like that, they will have access anyways?
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
Oh so I need to manually add an attribute and such, gotcha
Thanks \o/