/[drupal]/contributions/modules/services_oauth/services_oauth.module
ViewVC logotype

Diff of /contributions/modules/services_oauth/services_oauth.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2, Fri May 8 22:00:14 2009 UTC revision 1.3, Mon Jun 1 09:31:24 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: services_oauth.module,v 1.1 2009/05/08 21:12:30 hugowetterberg Exp $  // $Id: services_oauth.module,v 1.2 2009/05/08 22:00:14 hugowetterberg Exp $
3    
4  /**  /**
5   * Implementation of hook_services_authentication().   * Implementation of hook_services_authentication().
# Line 20  function services_oauth_authentication_i Line 20  function services_oauth_authentication_i
20   * Implementation of hook_perm().   * Implementation of hook_perm().
21   */   */
22  function services_oauth_perm() {  function services_oauth_perm() {
23    return array('services oauth register consumers');    return array('services oauth authorize consumers', 'services oauth register consumers');
24  }  }
25    
26  /**  /**
# Line 37  function services_oauth_menu() { Line 37  function services_oauth_menu() {
37      'type' => MENU_CALLBACK,      'type' => MENU_CALLBACK,
38    );    );
39    
40      $menu['oauth/authorized'] = array(
41        'title' => 'Authorization finished',
42        'page callback' => '_services_oauth_authorized',
43        'access callback' => '_services_oauth_always_true',
44        'file' => 'services_oauth.pages.inc',
45        'type' => MENU_CALLBACK,
46      );
47    
48    $menu['oauth/request_token'] = array(    $menu['oauth/request_token'] = array(
49      'page callback' => '_services_oauth_request_token',      'page callback' => '_services_oauth_request_token',
50      'access callback' => '_services_oauth_always_true',      'access callback' => '_services_oauth_always_true',
# Line 140  function services_oauth_authorization_le Line 148  function services_oauth_authorization_le
148  }  }
149    
150  function oauth_services_user_access($user) {  function oauth_services_user_access($user) {
151    return user_edit_access($user) && (user_access('access services', $user) || user_access('services oauth register consumers', $user));    return user_edit_access($user) && (user_access('services oauth authorize consumers', $user) || user_access('services oauth register consumers', $user));
152  }  }
153    
154  /**  /**

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2