service_class restrict facebook_connect

pull/63/head
friendica 2012-06-25 03:24:02 -07:00
parent 0e5b132328
commit ae70cbe9c7
2 changed files with 7 additions and 0 deletions

Binary file not shown.

View File

@ -509,6 +509,13 @@ function facebook_content(&$a) {
return '';
}
if(! service_class_allows(local_user(),'facebook_connect')) {
notice( t('Permission denied.') . EOL);
return upgrade_bool_message();
}
if($a->argc > 1 && $a->argv[1] === 'remove') {
del_pconfig(local_user(),'facebook','post');
info( t('Facebook disabled') . EOL);