Answers.Body: <p>It depends how you've set the permissions, what ACL groups they're in or what roles you've given them in the CMS</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-01T21:14:09.763Z
Answers.LastActivityDate: 2015-04-01T21:14:09.763Z
Answers.UserDisplayName: Sean Kenny
Answers.Body: <p>I believe what you're looking for is:</p>
  
  <pre><code>CRM_Core_Permission::check('edit all contacts')
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-29T17:31:21.763Z
Answers.Text: Ugh, I forgot this, Googled it, found my own answer.  Wish I could upvote it! :)
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-01T20:16:20.850Z
Answers.LastActivityDate: 2015-04-01T20:16:20.850Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>How can I tell if the currently logged-in user has a certain permission in CiviCRM?</p>
  
  <p>Should I use CMS-dependent functions, like <a href="https://api.drupal.org/api/drupal/modules%21user%21user.module/function/user_access/7" rel="nofollow">user_access('permission')</a> in Drupal, or can I use one CiviCRM function to check the permission for the current user?</p>
  
  <p>For example, how could I display a message if the currently logged-in user has the 'edit all contacts' permission?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-01T16:08:37.090Z
Comments.Text: Tell where? Template? Drupal module? CiviCRM extension?
Comments.UserDisplayName: choster
Tags: <permissions>
Title: How can I tell if the logged in user has a certain permission?
ThreadText: # How can I tell if the logged in user has a certain permission?
  
  (Asked by: username_0 on 2015-04-01)
  
  How can I tell if the currently logged-in user has a certain permission in CiviCRM?
  
  Should I use CMS-dependent functions, like [user\_access('permission')](https://api.drupal.org/api/drupal/modules%21user%21user.module/function/user_access/7) in Drupal, or can I use one CiviCRM function to check the permission for the current user?
  
  For example, how could I display a message if the currently logged-in user has the 'edit all contacts' permission?
  
  **Tags:** permissions
  
  > **Comments:**
  > **username_1**: Tell where? Template? Drupal module? CiviCRM extension?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2015-04-01. Score: 4 | Accepted answer
  
  I believe what you're looking for is:
  
  ```
  CRM_Core_Permission::check('edit all contacts')
  
  ```
  
  > **Comments:**
  > **username_3**: Ugh, I forgot this, Googled it, found my own answer.  Wish I could upvote it! :)  
  
  ---
  
  ### Answer by username_2 on 2015-04-01. Score: 1
  
  It depends how you've set the permissions, what ACL groups they're in or what roles you've given them in the CMS
  
  
  ---
  
  