Im trying to allow my admin to switch to an employee view and account when a button is pressed. Any ideas on how to make this functionality?
He would like to see the employee view and be able to navigate through the app as any employee.
Im trying to allow my admin to switch to an employee view and account when a button is pressed. Any ideas on how to make this functionality?
He would like to see the employee view and be able to navigate through the app as any employee.
Consider building user roles functionality in your app.
Role (options set)
Display (admin, employee, role3, role3, etc)
User
Name (text)
Role (role options set)
@cmarchan
That was my initial thought on the matter but he is wondering if its possible to allow the admin to actually login as the user. So like a skeleton key for all of the accounts.
So the accounts would be listed with a repeating group and then they have a button in the cell would allow the admin to switch to the cell’s user’s profile but logged in as the cell’s user.
Two ways:
or
He is wanting that “run as” functionality without having to switch to the database. being able to access that function from the app through a button.
Option 1
Hi there, @dillonlucas… looks like @cmarchan pointed you in a great direction, but I literally just implemented the feature you have described in one of my apps, so I thought it couldn’t hurt to throw something out there as food for thought.
Along with using an option set to define user roles, I added a field called view as
(with a field type of User
) to the User
data type. Then, when an admin clicks one of the buttons in the repeating group, you make a change to the current user to set their view as
field to the user associated with the button that was clicked. At that point, you can use the view as
field across the app to drive searches and filters so the admin sees everything exactly as the associated user would. Changing the searches and filters is easily done with conditions that say when a user’s role is admin (or whatever), change the search/filter to use the view as
field as opposed to current user.
Anyway, maybe that’s helpful and maybe it’s not, but it worked like a charm for me, and again, I didn’t think it could hurt to throw it out there.
Best…
Mike
This topic was automatically closed after 70 days. New replies are no longer allowed.