Answers.Body: <p>First of all you will need to update the CMS permission to remove view/edit data using profile. Configure ACL from CiviCRM UI to restrict group of contacts to update their contact using profile. </p>
  
  <p>Note: I guess changing the permission will result in profile not available for any user if they dont have access to. If you want to restrict specfic profile and enable all others them i think you can use <a href="https://docs.civicrm.org/dev/en/latest/hooks/list/#profile-hooks" rel="nofollow noreferrer">profile hooks</a> to return access denied.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-28T03:34:37.910Z
Answers.Text: thanks, I will work on returning access denied drupal way using Profile Hook https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildProfile/  and https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_access_denied/7.x is there any way we can do that in CiviCRM?
Answers.UserDisplayName: harshal
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-27T11:19:09.977Z
Answers.LastActivityDate: 2019-07-27T11:19:09.977Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I have Profile which I need to provide access to only user who are Active Members, So I have restricted Listings to Active Members only but when I go to the </p>
  
  <blockquote>
    <p>civicrm/profile/edit?gid=20&amp;reset=1</p>
    
    <p>civicrm/profile/create?gid=20&amp;reset=1
    It still displays the profile page.
    How can I make sure edit and create profile is displayed only if its an active member ?</p>
  </blockquote>
  
  <p>When I login with a member who is not a member and access the url of create/edit profile, it provides me the option to create or edit, how can I prevent that using civicrm settings ?</p>
  
  <p><a href="https://i.sstatic.net/YjUFn.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/YjUFn.png" alt="enter image description here"></a></p>
  
Tags: <drupal><profile>
Title: How to restrict Profile Edit/Create Visibility?
ThreadText: # How to restrict Profile Edit/Create Visibility?
  
  (Asked by: username_0 on 2019-07-27)
  
  I have Profile which I need to provide access to only user who are Active Members, So I have restricted Listings to Active Members only but when I go to the
  
  > civicrm/profile/edit?gid=20&reset=1
  >
  > civicrm/profile/create?gid=20&reset=1
  > It still displays the profile page.
  > How can I make sure edit and create profile is displayed only if its an active member ?
  
  When I login with a member who is not a member and access the url of create/edit profile, it provides me the option to create or edit, how can I prevent that using civicrm settings ?
  
  [![enter image description here](https://i.sstatic.net/YjUFn.png)](https://i.sstatic.net/YjUFn.png)
  
  **Tags:** drupal, profile
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-07-27. Score: 1 | Accepted answer
  
  First of all you will need to update the CMS permission to remove view/edit data using profile. Configure ACL from CiviCRM UI to restrict group of contacts to update their contact using profile.
  
  Note: I guess changing the permission will result in profile not available for any user if they dont have access to. If you want to restrict specfic profile and enable all others them i think you can use [profile hooks](https://docs.civicrm.org/dev/en/latest/hooks/list/#profile-hooks) to return access denied.
  
  > **Comments:**
  > **username_0**: thanks, I will work on returning access denied drupal way using Profile Hook https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildProfile/  and https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_access_denied/7.x is there any way we can do that in CiviCRM?  
  
  ---
  
  