Please Help - Setting up Admin User

Hi
I need help creating a Admin account and a Live Admin page. I have been able to create User accounts and data but I have been unable too see how I can define an admin user account. The aim is for admin to be able to display user data on the admins live page.

Thanks :slight_smile:

Add a field to the User.

For simple Admin management, as simple IsAdmin = Yes/No, for more complex you could add a field “permissions” which is a list of text values which define the users capabilities.

e.g, you could have ADMIN_USER_Create, ADMIN_USER_Edit could be 2 permissions that relate to user administration.

You would then look up these permissions to determine what the user logged in can do/see etc.

To expand a bit on Dave’s suggestion of granting a User conditionally determined permissions, you’ll likely want some kind of dashboard within the user interface, with fields calling in the type of User data you imagine the Admin needs to see.

Hi, I have a similar doubt. I understand DaveA’s solution but while working with conditionals I’ve seen something that says “Website admin email”. How do I set an User’s email as the “Website admin email”?

on my end i’m just adding a Role field under User then everytime a user is sign up it will set Role as Member so that all members will be members then i will manually add my User account Role as Admin

then if i want a page to only view by an Admin i will hide the RG or Group then add a Condition it will only visible to Current User’s Role is Admin because if i will only do a workflow to set Page load goto page Index if current user’s role is Member to prevent members to view the page it can be break by just pressing ESC.

Hey Dave

Just followed your option for a simple admin. Administrator = True / False. I have set this up on the DATA > USER > Administrator = YES / NO

How do I set up the workflow so its distinguishable from a normal login user

image

image

Thanks Dave

@i.naseem.in24
Only when current user’s admin=true. do this
Only when current user’s admin=false. do that

@anon65040322

Tried it like this seems to work, don’t know if its the best way to do it though, only been on bubble for about 15 hours in total so everything is new to me.

image

image

image

What do you think?

you havent set a data type for dashboard, change it user if thats what you want to send. but for dashboard i think you can leave blank. because you dont need a url like

yourapp.bubbleapps.io/dashboard/[userdata]

@anon65040322

Getting a 404 on that link, if i add Current User to data to send i get the following error

image

remove the data to send, like the error says, keep it empty/blank

1 Like

Thanks Mate! :slight_smile: @anon65040322

Just logged in to see it looks like you got help from @anon65040322, which is the same thing I would have said…

Cheers @anon65040322!

I’m attempting to do this, but when I click “Deploy to Live” the new “admin” field isn’t added to live data structure. What am I doing wrong? Elsewhere on the forum it says that clicking the deploy button pushes the data structure from dev to live, which makes sense, but it isn’t…

Hi @DaveA and all.

I am kind of facing a similar issue. My app isn’t live, but I want to make sure my email is set as Admin before I publish it. What’s the best way to do this? I’ve set up an option set for ‘Admin’ ‘Client’ and ‘manager’ under a created data type called ‘Role’. But am not sure if the system understands this as the data type is just ‘text’.

Help would be greatly appreciated