webtechnick/CakePHP-Facebook-Plugin — pull request #98 by zodouglass (2012-10-11 21:00:42+00:00)
Title: Added developer roles function to Connect component

Modified Connect Component:

added functions to get all developer roles for the application, and the current user's developer role for an application.
Roles include (administrators, developers, testers, insight users).

Common use is saving the role to the user model in beforeFacebookSave:
function beforeFacebookSave(){
$this->Connect->authUser['User']['email'] = $this->Connect->user('email');
$this->Connect->authUser['User']['username'] = $this->Connect->user('name');
$this->Connect->authUser['User']['role'] = $this->Connect->role();
return true;
}

And restricting certain areas of the site to certain roles:

if ($user['role'] == 'administrators') {
echo "admins only section";
}