Implement permission checking for OAuth clients using the xperm table. Currently 'all' permissions are applied to OAuth clients which gives them the same rights as the channel owner and full access to API functions as the channel owner. However, individual permissions can now be created. These mirror the permission names from the normal permission table (although it isn't required that they do so). Lack of an xp_perm entry for the specified permission and lack of an 'all' override indicates permission denied.
This commit is contained in:
@@ -78,11 +78,14 @@ require_once('include/items.php');
|
||||
// list($consumer,$token) = $oauth->verify_request(OAuthRequest::from_request());
|
||||
if (!is_null($token)){
|
||||
$oauth->loginUser($token->uid);
|
||||
|
||||
$a->set_oauth_key($consumer->key);
|
||||
|
||||
call_hooks('logged_in', $a->user);
|
||||
return;
|
||||
}
|
||||
echo __file__.__line__.__function__."<pre>";
|
||||
var_dump($consumer, $token);
|
||||
// var_dump($consumer, $token);
|
||||
die();
|
||||
}
|
||||
catch(Exception $e) {
|
||||
|
Reference in New Issue
Block a user