I’m having difficulty creating a conditional side menu.
If you are a regular user, you must disable the admin item.
If you are an admin user, you must enable the admin item in the side menu.
How should I proceed?
No, I only showed part of my block.
The part where I’m struggling.
This screen is where the registered user with an administrator profile will see a complete list of all registered users.
Here, the ADMIN user will have the power to register new users and delete them.
This whole part is working perfectly.
Welcome. I suggest to split the app into 2 projects.
Separate the routines for each type of user that can access.
And create the 2 apps independent of each other.
Example: Look at this routine to enable the side menu, it won’t exist if you separate the routines into 2 apps.
In future updates in 1 app , will not interfere with the other app (in case of bugs)
I already have in the base the values of the common users or administrator.
In the first screen, the user logs in normally, after he is directed to another screen.
If the user logged in to “admin” then this item should appear:
But after getting tag list , you need to get fb value then only this part will work. If possible show us the fb structure…
Also in oder to make more complex why don’t you make it simple one. . After registration just save the name in a tinydb as admin or user. And in this screen in the screen initial itself just check the tinydb value. If it is admin show admin if not show user
If not you can create another bucket as admin and user after successful login or registration.
Tag(username) - value (yes)
In this screen just get tag list of the bucket admin and user. If the name existing in either one show the relevant sidemenu
I don’t think that is good idea… you need to check the particular user is admin or user. Suppose if you set across the base mean, app will favour to what you using the search text. It means in the Is in the list if you User , then app will open User panel only because across the base mean user text is present That’s why I am telling this is not good.