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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Warning on Public Contribution Pages for Admins to NOT Enter Data This Way
Pages: [1]

Author Topic: Warning on Public Contribution Pages for Admins to NOT Enter Data This Way  (Read 1134 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Warning on Public Contribution Pages for Admins to NOT Enter Data This Way
April 28, 2010, 12:38:00 pm
Despite my best trainings (web videos, etc) it seems there is always a new staffer coming on board at one of my Orgs that doesn't take the time to learn or isn't properly trained by their peers.

Invariably, some staff member with some degree of Admin permissions like for instance:
Code: [Select]
administer CiviCRM  (at the very least)
edit all contacts
edit all events
edit contributions
edit event participants
edit groups
edit memberships
ends up going to a public form while logged in as an admin and entering in someone else's info.  Like for instance Sally Admin uses the public "Donation" Page to enter a new contribution she has received in the mail from Joe Jones.  This, of course, screws up Sally Admin's own Contact info and fails to create a new Contact for Joe Jones, because she is logged in as an admin, get it?  This has happened at least 5 times in the last year.

Well, I'd like to "idiot proof" this little system a bit and provide some kind of a warning on the CRM/Contribute/Form/Contribution/Main.tpl that checks for one of the above permissions, and if exists, displays a warning like this.


Quote
Warning: You are currently logged in as an administrator.  Entering Contact information for someone else on this page will overwrite your own Contact information and result in a failure to enter the transaction properly.  Use the <a href="/civicrm">Admin</a> area to enter other people's data unless you actually intend to enter a transaction for yourself.

Sound good?

I'm happy to submit the patch, just need to know how to check permissions on the .tpl to display the warning.  
« Last Edit: April 28, 2010, 12:47:03 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: Warning on Public Contribution Pages for Admins to NOT Enter Data This Way
April 28, 2010, 05:18:04 pm

you should read:

http://irc.civicrm.org/logs/%23civicrm.log.27Apr2010: 17:48, and a more specific solution at 18:18

i think that would be a great addition to add as a module

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

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Warning on Public Contribution Pages for Admins to NOT Enter Data This Way
April 28, 2010, 06:19:56 pm
Thanks, that's good info.  It makes sense that the warning should only appear for certain roles and/or permissions, and these should be configurable to an extent.  My inclination is to make the warning appear for certain Drupal roles.  So I would have to figure out how to access user roles from the $session->get( 'ufID' )
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Warning on Public Contribution Pages for Admins to NOT Enter Data This Way

This forum was archived on 2017-11-26.