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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Authorities on Activities
Pages: [1]

Author Topic: Authorities on Activities  (Read 1176 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Authorities on Activities
February 19, 2012, 03:54:00 pm
In CiviCRM core, permissions for activities is a bit weak: Someone can either see all back-office activities in the system, or none. (E.g. back-office created activities such as "phone call", "meeting", etc.

As a result, I have a quick-and-dirty Drupal module to put granular permissions on activities.  Currently it looks for an activity custom field called "Privacy" which has the options of "Anyone" or "Restricted to a special group".    If the choice of ""Restricted to a special group" is picked, then only users in an ACL group can view/edit that activity.

I would like to change the core and see activity permissions in CiviCRM core, just like "note" and other object permissions are in core.

What architecture should be followed so that this code can be part of the core?   Since the table "civicrm_note" has a field called "privacy", should the same field be added to the table named "civicrm_activity"?

Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

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: Authorities on Activities
February 19, 2012, 04:26:54 pm

might want to chat with allen shaw about this. he did the note stuff and is also driving the activity stuff

personally i think we should combine all the activity contacts into one table for efficiency and scaling reasons and then layer permissioning on that table.

that increases the scope of the project though

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

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Authorities on Activities
February 20, 2012, 07:30:09 am
He and I are already working on this together. (as well as the note permissions).  We both wanted more input from the community about planned changes.
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

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: Authorities on Activities
February 20, 2012, 08:03:10 am

Might want to do a blog post on this. Its gets a lot more traffic than a forum post

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

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Authorities on Activities
February 20, 2012, 06:10:29 pm
Sounds like a good idea to me. Don't want to expend the scope for the sake of it but...

One issue we have had with activities is that the contacts are spread into 3 different tables and the API team would love to have a single activity_contact table with a "role" column in it.

This might be something that would simplify a great lot your implementation too?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Authorities on Activities
February 20, 2012, 07:28:38 pm
In some cases, it may be simpler to treat activities as participant records, since there is already a concept of role/status
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Authorities on Activities

This forum was archived on 2017-11-26.