Having components visible only to admin

Hello,

Building an app with the following sections.

  • Project tab with multiple projects
  • Each project also has a button that sends out an email to the project participants
  • This is a Public App Without Email - as we would like anyone to access

But:

  • The Button “Send Project Update Email” must only be visible to the admin or a specific user.
  • Essentially - a login screen which appears only when clicked on, like any other app/website one is typically used to

Tried the Component Visibility options but that is not applicable in this case.

How to enable this?

thanks
Raj

1 Like
  • My bad, I just noticed the SIGN-IN in the ACTION TEXT.
  • However, I want the button only to show up after signing in as admin or some specific email

Apologies in advance if this has already been answered elsewhere… :pray:

In your user profile sheet, you’ll need to specify some sort of indicator for admin. It could be a checkbox column (eg isAdmin) or a text column (eg role) where you’re typing in roles and would this type “Admin”. Then, you’ll set a visibility condition on those components where user > isAdmin is true or user > role is Admin

1 Like

But does “Sign In” compare with an entry in user profile?
Is there a standard template for the user profile sheet?
Any references would be great. :pray:

I should be doing a more extensive search first before asking a question… :pray:

let me look into this first…

OK. I see what you mean. I checked out the User Profiles tutorial but it asks the sign in should be Public with Email. However, we want to make it purely a public and not sure if it works in that mode.

Any help would be great! Thanks! :pray:

You can still make Public app with sign in.

Upon sign in, the admin can view specific content. I’d create a new column call User Type: admin so Visibility / Filters work with this.

This is a little confusing. Which spreadsheet tab? I have created a tab in google sheets called ‘User Profiles’. But if I provide a “Sign In” button which Glide Tab is it supposed to be called from?

Ideally I want to create a Sign In button in the Home tab. But the Home tab contains public information as well. So if I were to provide the ‘sign in’ button what should be its behavior?

To make a public app works with a user profiles setup, you first change your app to public with email, assign a sheet to be your user profiles sheet, then switch back to public.

A “Sign in” button does not ask you to point it to a tab, the step above is enough.

1 Like

It worked…
THANK YOU!!!

Is this written anywhere in the docs? I obviously missed it. Else, it should be added.
thanks much!! :pray: :slightly_smiling_face:

I’m not sure it was written in the docs, if you have any questions that are not covered in the docs just ask us here.