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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • administer civicrm
Pages: [1]

Author Topic: administer civicrm  (Read 2233 times)

CousiMo

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 2
administer civicrm
June 05, 2008, 07:31:24 am
1. I want to give our staff access to configure events, but I've noticed its only allowed if i give them access to "administer civicrm"
2. having some issues with access in "view all activity"  i unchecked it for "staff" and logged in under a staff" and still see all activities.


Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: administer civicrm
June 06, 2008, 03:58:49 am
1. To give access to configure events, you would need to give following permission :
   a)access CiviEvent
   b)edit event participants
   c)view event participants

2. It shouldn't happen.

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: administer civicrm
June 06, 2008, 06:48:14 am
2. Does your "staff" role have "Administer CiviCRM" checked off? The ability to view all activities is possible with EITHER "Administer CiviCRM" OR "View All Activity" permissions. Make sure neither are checked. If it still happens, please report back so that someone with administrative privileges can try to recreate on the demo.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: administer civicrm
June 07, 2008, 11:33:56 am
With regard to "Manage Events" - the change to just require "access CiviEvent" is part of 2.1. The Issue tracker item is here:
http://issues.civicrm.org/jira/browse/CRM-2922

... you can probably fix this in 2.0 if you need it before 2.1 is released by modifying this line (around line # 101) in CRM/Event/Menu.php:

Code: [Select]
// from this
      'access'  => CRM_Core_Permission::check('administer CiviCRM') && CRM_Core_Permission::check( 'access CiviEvent' ),

// to this
      'access'  => CRM_Core_Permission::check( 'access CiviEvent' ),
Protect your investment in CiviCRM by  becoming a Member!

CousiMo

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 2
Re: administer civicrm
June 19, 2008, 01:36:58 pm
Quote from: Yashodha Chaku on June 06, 2008, 03:58:49 am

2. It shouldn't happen.

HTH
-Yashodha

it happens.. i took off the the adminiser civicrm and i still can see everyone's activity ( not logged in as admin)

Quote from: Dave Greenberg on June 07, 2008, 11:33:56 am
With regard to "Manage Events" - the change to just require "access CiviEvent" is part of 2.1. The Issue tracker item is here:
http://issues.civicrm.org/jira/browse/CRM-2922

... you can probably fix this in 2.0 if you need it before 2.1 is released by modifying this line (around line # 101) in CRM/Event/Menu.php:

Code: [Select]
// from this
      'access'  => CRM_Core_Permission::check('administer CiviCRM') && CRM_Core_Permission::check( 'access CiviEvent' ),

// to this
      'access'  => CRM_Core_Permission::check( 'access CiviEvent' ),


that dididnt' work... is there another location where i should be editing.. i tried all of them on that page..

CousiMo

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 2
Re: administer civicrm
June 19, 2008, 01:45:50 pm
let me clarify when i am looking at activities i am looking in the person's profile under activity not the one on the main screen

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: administer civicrm
June 19, 2008, 03:48:32 pm
1. Regarding Activities...
Yep - and the "view all activities" permission is only used to control whether activities that don't "belong" to the logged in user are displayed in the CiviCRM Home (dashboard) list of scheduled activities. There is no way currently to conditionally show the "Activities" tab when viewing a specific contact record. If you want to look at modifying the code - the permission check would need to be added in CRM/Contact/Page/View/Tabbed.php around line 212 where the array of tabs are assembled ($reset = ...)

2. Regarding Manage Events permission - not sure why that didn't work (or exactly what you mean by that). You might need to check the relevant templates and see if there's conditions around the links etc. or add some debug statements in the code.
Protect your investment in CiviCRM by  becoming a Member!

FredJones

  • Guest
Re: administer civicrm
June 25, 2008, 02:36:05 pm
Quote from: Dave Greenberg on June 19, 2008, 03:48:32 pm
2. Regarding Manage Events permission - not sure why that didn't work (or exactly what you mean by that). You might need to check the relevant templates and see if there's conditions around the links etc. or add some debug statements in the code.

I tried further editing line 101 of CRM/Event/Menu.php thusly:

Code: [Select]
                                 'access'  => 1, //CRM_Core_Permission::check( 'access CiviEvent' ),

but when I access the page I get the red X with yellow background and:

Code: [Select]
Sorry. A non-recoverable error has occurred.
You do not have access to this page

when logged in as a user other than #1. User #1 works for this page. So I thought perhaps it's getting stuck on the check in line 44 of CRM/Event/Invoke.php, that being:

Code: [Select]
        if ( ! CRM_Core_Permission::check( 'administer CiviCRM' ) ||
             ! CRM_Core_Permission::check('access CiviEvent') ) {
            CRM_Core_Error::fatal( ts( 'You do not have access to this page' ) );
        }

but editing that code indicates that's not it either. As a matter of fact, it doesn't even get to this function admin at all AFAICT. I will try further debugging tomorrow, as I am already a bit tired today, but thus far, something seems a bit odd. Using 2.0.4.

Thank you.

FredJones

  • Guest
Re: administer civicrm
June 30, 2008, 09:41:12 am
My research indicates that not only must line 101 of CRM/Event/Menu.php be edited, but also line 45 of \CRM\Event\Invoke.php and also 581 of CRM\Core\Invoke.php. These second two locations also have permissions checks and they require 'administer CiviCRM'

Once I fixed those, I achieved the desired functionality.

In reality, I decided in the end to add a new permission I called 'administer CiviCRM Events' to avoid any confusion, but still all 3 of the above locations needed to be edited.

Thank you for the assistance in putting me in the right direction! :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • administer civicrm

This forum was archived on 2017-11-26.