CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Menu items showing for anonymous users and they have no CiviCRM access
Pages: [1]

Author Topic: Menu items showing for anonymous users and they have no CiviCRM access  (Read 1590 times)

shoresh

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
Menu items showing for anonymous users and they have no CiviCRM access
April 01, 2009, 08:56:24 pm
I have set up a totally private CiviCRM site.  Anonymous users have no CiviCRM access rights whatsoever.  I created two menu items:  one to manage a profile (http://<my site url>/civicrm/profile/edit?reset=1&gid=N) and one to search contacts (http://<my site url>/civicrm/profile?reset=1&gid=3).  When I log out of the site both menu items remain.  Clicking on them causes an error because anonymous users don't have the proper permissions.  I'm fairly new to CiviCRM and Drupal, but since most menu items disappear if the current user doesn't have permission for the action specified, I thought these menu items would disappear as well.  What am I doing wrong?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Menu items showing for anonymous users and they have no CiviCRM access
April 02, 2009, 07:04:06 am

i assume u r creating menu items via drupal's menu manager? if so, you'll need to control the display and visibility there. we dont have any control of what happens for manually created menu items

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

shoresh

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
Re: Menu items showing for anonymous users and they have no CiviCRM access
April 02, 2009, 09:57:19 am
All I can do with manually created menu items is enable or disable them.  I need to enable them based on role or user.  Any thoughts?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Menu items showing for anonymous users and they have no CiviCRM access
April 02, 2009, 10:04:01 am

not too drupal savvy, you might want to check the drupal web site to see if there are helper modules that do what you need

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Re: Menu items showing for anonymous users and they have no CiviCRM access
April 02, 2009, 11:57:52 am
In Drupal, every menu is also a block. So you need to go to <yoursite>/admin/build/block and find the block that corresponds to the menu you created. Click on configure and under "role specific visibility settings" you can control which roles can view the block. Just select authenticated user but not anonymous users and you'll be fine.

hope this helps
tony
http://dharmatech.org
oss@dharmatech.org
801.541.8671

shoresh

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
Re: Menu items showing for anonymous users and they have no CiviCRM access
April 02, 2009, 01:46:27 pm
I wanted the items to be on the primary menu which apparently is not a block and besides I only wanted to restrict access to two out of six items on the primary menu.  But thanks for the info Tony.  I guess I'll have to move those two items to their own block, restrict access to the roles I want and install the new block on one of the sidebars.  I would have liked them on the primary menu however, so if there's a way to do that I'd love to know about it.

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Re: Menu items showing for anonymous users and they have no CiviCRM access
April 02, 2009, 02:00:47 pm
Oh, I see what you mean now. You may want to try this module: http://drupal.org/project/menu_per_role

I haven't used it myself but may work for you.

tony
http://dharmatech.org
oss@dharmatech.org
801.541.8671

shoresh

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
Re: Menu items showing for anonymous users and they have no CiviCRM access
April 02, 2009, 02:20:24 pm
Thanks again.  I'll check the plugin out.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Menu items showing for anonymous users and they have no CiviCRM access

This forum was archived on 2017-11-26.