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 »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Lost admin access in Civi after updating Drupal Roles/Permissions
Pages: [1]

Author Topic: Lost admin access in Civi after updating Drupal Roles/Permissions  (Read 1302 times)

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Lost admin access in Civi after updating Drupal Roles/Permissions
October 08, 2012, 10:28:58 pm

I have been updating, renaming and removing many of my old Drupal roles and associated permissions.  I have similarly updated and modified the admin role. 

The problem is that when I try to view or edit a CiviCRM contact, I am now taken to my own personal dashboard instead of the edit/view screen for the contact that I clicked on.  I have re-associated the admin account with the 'CiviGroup Roles Sync' and CiviMember Roles Sync' without any luck.  I ran a manual synchronization with any luck.  I also disabled all of my ACL's without luck. 

I am able to view the entire CiviCRM admin menu, however not being able to view or edit contact profiles is a problem.  What steps did I miss after modifying or recreating the Drupal admin role?  I have made sure that the Drupal role has every CiviCRM permission enabled.


Thanks

Jason W

  • I post frequently
  • ***
  • Posts: 197
  • Karma: 12
  • jason@civitrainingtutorials.com
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.x.x
Re: Lost admin access in Civi after updating Drupal Roles/Permissions
October 09, 2012, 08:52:59 am
Hello mcgeehon,

Here's a couple of ideas/questions.

1. Is it possible that in the changes you've made to your Drupal Roles your user profile wasn't fitted to the CiviCRM admin role?

2. What happens when you create aa ACL that allows you to perform all operations on contacts? Are you able to edit them in this case or are you still redirected?

Regards,
Jason
civiTrainingTutorials
"Helping You Help Others"

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Lost admin access in Civi after updating Drupal Roles/Permissions
October 09, 2012, 11:18:13 am
Jason,

I am unable to create an ACL that grants 'All' operations on a group.  I can only assign 'View' or 'Edit' privaleges.   I did this with no luck.

I went ahead and removed all:

1. CiviCRM ACL Roles
2. ACL's
3. Non required Managed Roles

Assuming I am starting with a blank slate or new install, what is the procedure to add an admin account to CiviCRM?   My assumption is the following:

1. Create an Admin group under contacts
2. Add the Admin account to this group
3. Create an Admin Role in CiviCRM
4. Assign a Group to an ACL Role
5. Define the the ACL itself for this ACL Role.

In Drupal, you would:

1. Create the appropriate Role
2. Set the CiviCRM permissions for this Admin role (check everything)
3. Add the Drupal user to this admin role.
4. Link the Drupal Admin role with the CiviCRM Group in the 'CiviCRM Group Roles Sync'
5. Perform a manual synchronization

Step #5 above times out however.   Am I missing something?


Josh

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Lost admin access in Civi after updating Drupal Roles/Permissions
October 10, 2012, 02:02:36 am
Hey there,

Quote
I have made sure that the Drupal role has every CiviCRM permission enabled.

To clarify, are you saying that when logged in as a Drupal user with all CiviCRM permissions, you are not allowed to view any contacts in your CiviCRM installation?

Drupal permissions 'override' CiviCRM permissions so any Drupal user with all CiviCRM permissions should be able to do the above, regardless of any CiviCRM permissions that are set further down the line.  So what you are experiencing above is quite strange  :-\

Do you have any other custom code themes / modules set up that might be interacting here?

Quote
what is the procedure to add an admin account to CiviCRM?

All you would need to do is give the user a Drupal role that has appropriate CiviCRM permissions set up in the Drupal permissions screen.  You don't need to touch anything in CiviCRM's ACL.

Quote
when I try to view or edit a CiviCRM contact, I am now taken to my own personal dashboard instead of the edit/view screen for the contact that I clicked on

IMO that is a funky behaviour and might be a clue as to what is going on (tho am stumped atm as to what to suggest next). Hopefully someone else will chip in, otherwise ping us again if you don't solve the issue.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

mcgeehon

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
  • CiviCRM version: 4.x
  • CMS version: 7.x
  • MySQL version: 5.x
  • PHP version: 5.2.x
Re: Lost admin access in Civi after updating Drupal Roles/Permissions
October 10, 2012, 10:59:11 am
Michael,

You make a good point.  I removed all ACL's and other associations between Groups and Roles.   I have my admin added to a Drupal role that has every CiviCRM permission box checked.   However, when I click on a link like:

http://mydomain.com/civicrm/contact/view?reset=1&cid=17435

I am instead re-routed to the following:

http://mydomain.com/dashboard/admin

Other than this, I can access the full CiviCRM admin menu.  The idea that this might be custom theme related is interesting.  I am running a custom theme that was developed for me, and I am wondering now if the old Drupal roles might be hard-coded into the theme?   

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Lost admin access in Civi after updating Drupal Roles/Permissions
October 11, 2012, 03:41:05 am
hmm, http://mydomain.com/dashboard/admin is not a civicrm link.

basically, i am still stumped - sorry i can't be more helpful.

if i were in your shoes (I didn't get any bright ideas from anyone else)...

I would start disabling modules, inspecting the code, etc.  If the site is publicly available / has users that you don't want to upset, I'd probably do that on a test site.

Not sure if that is outside of your comfort zone or not. If so, you might want to ask your developer to do so.

And you might want to also prepare for it being something very obvious / simple / easy when you know how :)

Good luck!
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Lost admin access in Civi after updating Drupal Roles/Permissions

This forum was archived on 2017-11-26.