Skip to content

Instantly share code, notes, and snippets.

@simkimsia
Created June 22, 2012 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simkimsia/2973347 to your computer and use it in GitHub Desktop.
Save simkimsia/2973347 to your computer and use it in GitHub Desktop.
Florian code for OauthAuthorize
<?php
App::uses('BaseAuthorize', 'Controller/Component/Auth');
class OauthAuthorize extends BaseAuthorize {
public function authorize($user, CakeRequest $request) {
$Acl = $this->_Collection->load('Acl');
$Oauth = $this->_Collection->load('Oauth');
$user = array($this->settings['userModel'] => $Oauth->user());
return $Acl->check($user, $this->action($request));
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment