Problem/Motivation

I configured a new modal on a single path to show up ONLY to registered users, but admin sees it too.

Steps to reproduce

Create your modal, choose only authenticated user under roles restriction, maybe set a path to work on.

Comments

d4t3r created an issue. See original summary.

renatog’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

Hello @d4t3r how are you?

But the role called "authenticated user" is the role related to any user logged in Drupal, that's right?

So in other words, any user logged in Drupal is considered "authenticated user" including "Admin User". You know?

drupalbubb’s picture

Category: Support request » Feature request
Status: Postponed (maintainer needs more info) » Active

Hi @RenatoG,
no i didn't know. And yes, you are right.
Please make this option available. (I am deleting all cookies on browser close, so the modal pops up every day admin logs in)
Is there a special reason for the double "show title" option?

renatog’s picture

Category: Feature request » Support request
Status: Active » Needs review

Hello @d4t3r how are you?!

Please make this option available. (I am deleting all cookies on browser close, so the modal pops up every day admin logs in

Which option do you want?

You want to show this modal for all roles, except "Admin Users" that's right?
It's simple you just need to do it:

  1. Go in your modal and edit it
  2. Go to "Roles Field"
  3. Mark all roles there EXCEPT "admin users" and "authenticated user"
  4. Clear your Drupal Caches

Done! Just it, this modal will appear for everyone EXCEPT for "Admin Users"

I hope to help 😊👍

drupalbubb’s picture

Hi @RenatoG,
sorry that i am not telling the world how i am.

But i only checked "authenticated users" at ROLES RESTRICTION, leaving the admin and guest role unchecked.
But the modal shows when the admin user visits the page.
I would like to see the admin user excluded at this point.

Sorry if my posting is not clear enough.

renatog’s picture

Yes, you're super clear @d4t3r, now but this behavior is expected @d4t3r.

I'll explain for you:

This role "authenticated users" stands for ALL USERS in Drupal, you know?

If you select to show this modal for "authenticated users" this modal will be shown for ALL LOGGED USERS (including ADMIN Users)

If you want to show this modal for ALL users EXCEPCT Admin users please follow this steps:

  1. Go to your modal and edit
  2. Go to "Roles field"
  3. Mark all roles
  4. Leave the option "authenticated users" UNCHECKED
  5. Leave the Role "Admin Unchecked" UNCHECKED
  6. With this, your modal will appear for everyone EXCEPT for Admin Users.

Is it clear for you?

Please try this and let us know if it worked for you

drupalbubb’s picture

So this is a feature request to allow following situation:

anonymous users -> unchecked
authenticated users -> checked
admin -> unchecked

The last checkbox for the admin user has no effect at the moment, i would say. But i would like to use this role restriction, as it would prevent me from clicking this modal every day on admin login. (I am deleting my cookies every day)
Thanks!

drupalbubb’s picture

Category: Support request » Feature request
Status: Needs review » Active
renatog’s picture

Hello @d4t3r how are you?

@d4t3r but if you mark the option “authenticated users” and uncheck “admin users” it will continue showing to admin users because “authenticated users” will cover all users logged in Drupal site you know?

I understood your feature request but Drupal works like this that's right?

You can do this:

  • Create a new block
  • Place it in any page

Use this roles

  • anonymous users -> unchecked
  • authenticated users -> checked
  • admin -> unchecked

This block will appear for admin users as well. Could you confirm, please?

If you want don't show for admin you should uncheck “authenticated users” because it means “all users” in the site, you know?!

renatog’s picture

Version: 4.0.25 » 4.1.x-dev
Status: Active » Postponed (maintainer needs more info)