Skip to content

Commit bcbdd9f

Browse files
committed
[Special:Connect/Debug] Added stricter check for editing Facebook application settings on Special:Connect/Debug
1 parent 4e6aecd commit bcbdd9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Facebook/FacebookApplication.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ function __construct() {
5555
* or developer of the app and must also be an administrator of the wiki.
5656
*/
5757
function canEdit($fbUser = NULL) {
58-
global $facebook;
58+
global $facebook, $wgUser;
5959
if ( !( $fbUser instanceof FacebookUser ) ) {
6060
$fbUser = new FacebookUser();
6161
}
6262

6363
// First, check MediaWiki permissions. Then check with Facebook
64-
if ( !$fbUser->getMWUser()->getId() )
64+
if ( $fbUser->getMWUser()->getId() == 0 || $fbUser->getMWUser()->getId() != $wgUser->getId() )
6565
return false;
6666

6767
// If $wgFbUserRightsFromGroups is set, this should trigger a group check

0 commit comments

Comments
 (0)