Beispiel #1
0
OCP\App::registerAdmin('user_ldap', 'settings');
$helper = new \OCA\user_ldap\lib\Helper();
$configPrefixes = $helper->getServerConfigurationPrefixes(true);
$ldapWrapper = new OCA\user_ldap\lib\LDAP();
$ocConfig = \OC::$server->getConfig();
if (count($configPrefixes) === 1) {
    $dbc = \OC::$server->getDatabaseConnection();
    $userManager = new OCA\user_ldap\lib\user\Manager($ocConfig, new OCA\user_ldap\lib\FilesystemHelper(), new OCA\user_ldap\lib\LogWrapper(), \OC::$server->getAvatarManager(), new \OCP\Image(), $dbc);
    $connector = new OCA\user_ldap\lib\Connection($ldapWrapper, $configPrefixes[0]);
    $ldapAccess = new OCA\user_ldap\lib\Access($connector, $ldapWrapper, $userManager);
    $ldapAccess->setUserMapper(new OCA\User_LDAP\Mapping\UserMapping($dbc));
    $ldapAccess->setGroupMapper(new OCA\User_LDAP\Mapping\GroupMapping($dbc));
    $userBackend = new OCA\user_ldap\USER_LDAP($ldapAccess, $ocConfig);
    $groupBackend = new OCA\user_ldap\GROUP_LDAP($ldapAccess);
} else {
    if (count($configPrefixes) > 1) {
        $userBackend = new OCA\user_ldap\User_Proxy($configPrefixes, $ldapWrapper, $ocConfig);
        $groupBackend = new OCA\user_ldap\Group_Proxy($configPrefixes, $ldapWrapper);
    }
}
if (count($configPrefixes) > 0) {
    // register user backend
    OC_User::useBackend($userBackend);
    OC_Group::useBackend($groupBackend);
}
OCP\Util::addTranslations('user_ldap');
OCP\Backgroundjob::registerJob('OCA\\user_ldap\\lib\\Jobs');
OCP\Backgroundjob::registerJob('\\OCA\\User_LDAP\\Jobs\\CleanUp');
if (OCP\App::isEnabled('user_webdavauth')) {
    OCP\Util::writeLog('user_ldap', 'user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour', OCP\Util::WARN);
}
Beispiel #2
0
<?php

OCP\Util::addTranslations('files_versions');
OCP\Util::addscript('files_versions', 'versions');
OCP\Util::addStyle('files_versions', 'versions');
\OCA\Files_Versions\Hooks::connectHooks();
Beispiel #3
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
use OCA\Files\Appinfo\Application;
// Check if we are a user
OCP\User::checkLoggedIn();
// Load the files we need
OCP\Util::addStyle('files', 'files');
OCP\Util::addStyle('files', 'upload');
OCP\Util::addStyle('files', 'mobile');
OCP\Util::addTranslations('files');
OCP\Util::addscript('files', 'app');
OCP\Util::addscript('files', 'file-upload');
OCP\Util::addscript('files', 'jquery.iframe-transport');
OCP\Util::addscript('files', 'jquery.fileupload');
OCP\Util::addscript('files', 'jquery-visibility');
OCP\Util::addscript('files', 'filesummary');
OCP\Util::addscript('files', 'breadcrumb');
OCP\Util::addscript('files', 'filelist');
OCP\Util::addscript('files', 'search');
\OCP\Util::addScript('files', 'favoritesfilelist');
\OCP\Util::addScript('files', 'tagsplugin');
\OCP\Util::addScript('files', 'favoritesplugin');
\OC_Util::addVendorScript('core', 'handlebars/handlebars');
OCP\App::setActiveNavigationEntry('files_index');
$l = \OC::$server->getL10N('files');
Beispiel #4
0
<?php

/**
* ownCloud - user_webdavauth
*
* @author Frank Karlitschek
* @copyright 2012 Frank Karlitschek frank@owncloud.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*
*/
require_once OC_App::getAppPath('user_webdavauth') . '/user_webdavauth.php';
OC_APP::registerAdmin('user_webdavauth', 'settings');
OC_User::registerBackend("WEBDAVAUTH");
OC_User::useBackend("WEBDAVAUTH");
OCP\Util::addTranslations('user_webdavauth');
// add settings page to navigation
$entry = array('id' => "user_webdavauth_settings", 'order' => 1, 'href' => OC_Helper::linkTo("user_webdavauth", "settings.php"), 'name' => 'WEBDAVAUTH');
Beispiel #5
0
<?php

$l = \OC::$server->getL10N('files_trashbin');
OCP\Util::addTranslations('files_trashbin');
OC::$CLASSPATH['OCA\\Files_Trashbin\\Exceptions\\CopyRecursiveException'] = 'files_trashbin/lib/exceptions.php';
// register hooks
\OCA\Files_Trashbin\Trashbin::registerHooks();
\OCA\Files\App::getNavigationManager()->add(array("id" => 'trashbin', "appname" => 'files_trashbin', "script" => 'list.php', "order" => 50, "name" => $l->t('Deleted files')));
Beispiel #6
0
 * See the COPYING-README file.
 */
$l = \OC::$server->getL10N('files_external');
OC::$CLASSPATH['OC\\Files\\Storage\\StreamWrapper'] = 'files_external/lib/streamwrapper.php';
OC::$CLASSPATH['OC\\Files\\Storage\\FTP'] = 'files_external/lib/ftp.php';
OC::$CLASSPATH['OC\\Files\\Storage\\OwnCloud'] = 'files_external/lib/owncloud.php';
OC::$CLASSPATH['OC\\Files\\Storage\\Google'] = 'files_external/lib/google.php';
OC::$CLASSPATH['OC\\Files\\Storage\\Swift'] = 'files_external/lib/swift.php';
OC::$CLASSPATH['OC\\Files\\Storage\\SMB'] = 'files_external/lib/smb.php';
OC::$CLASSPATH['OC\\Files\\Storage\\SMB_OC'] = 'files_external/lib/smb_oc.php';
OC::$CLASSPATH['OC\\Files\\Storage\\AmazonS3'] = 'files_external/lib/amazons3.php';
OC::$CLASSPATH['OC\\Files\\Storage\\Dropbox'] = 'files_external/lib/dropbox.php';
OC::$CLASSPATH['OC\\Files\\Storage\\SFTP'] = 'files_external/lib/sftp.php';
OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php';
OC::$CLASSPATH['OCA\\Files\\External\\Api'] = 'files_external/lib/api.php';
OCP\Util::addTranslations('files_external');
OCP\App::registerAdmin('files_external', 'settings');
if (OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') == 'yes') {
    OCP\App::registerPersonal('files_external', 'personal');
}
\OCA\Files\App::getNavigationManager()->add(array("id" => 'extstoragemounts', "appname" => 'files_external', "script" => 'list.php', "order" => 30, "name" => $l->t('External storage')));
// connecting hooks
OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\\OC_Mount_Config', 'initMountPointsHook');
OCP\Util::connectHook('OC_User', 'post_login', 'OC\\Files\\Storage\\SMB_OC', 'login');
OC_Mount_Config::registerBackend('\\OC\\Files\\Storage\\Local', array('backend' => (string) $l->t('Local'), 'priority' => 150, 'configuration' => array('datadir' => (string) $l->t('Location'))));
OC_Mount_Config::registerBackend('\\OC\\Files\\Storage\\AmazonS3', array('backend' => (string) $l->t('Amazon S3'), 'priority' => 100, 'configuration' => array('key' => (string) $l->t('Key'), 'secret' => '*' . $l->t('Secret'), 'bucket' => (string) $l->t('Bucket')), 'has_dependencies' => true));
OC_Mount_Config::registerBackend('\\OC\\Files\\Storage\\AmazonS3', array('backend' => (string) $l->t('Amazon S3 and compliant'), 'priority' => 100, 'configuration' => array('key' => (string) $l->t('Access Key'), 'secret' => '*' . $l->t('Secret Key'), 'bucket' => (string) $l->t('Bucket'), 'hostname' => '&' . $l->t('Hostname'), 'port' => '&' . $l->t('Port'), 'region' => '&' . $l->t('Region'), 'use_ssl' => '!' . $l->t('Enable SSL'), 'use_path_style' => '!' . $l->t('Enable Path Style')), 'has_dependencies' => true));
OC_Mount_Config::registerBackend('\\OC\\Files\\Storage\\Dropbox', array('backend' => 'Dropbox', 'priority' => 100, 'configuration' => array('configured' => '#configured', 'app_key' => (string) $l->t('App key'), 'app_secret' => '*' . $l->t('App secret'), 'token' => '#token', 'token_secret' => '#token_secret'), 'custom' => 'dropbox', 'has_dependencies' => true));
OC_Mount_Config::registerBackend('\\OC\\Files\\Storage\\FTP', array('backend' => 'FTP', 'priority' => 100, 'configuration' => array('host' => (string) $l->t('Host'), 'user' => (string) $l->t('Username'), 'password' => '*' . $l->t('Password'), 'root' => '&' . $l->t('Remote subfolder'), 'secure' => '!' . $l->t('Secure ftps://')), 'has_dependencies' => true));
OC_Mount_Config::registerBackend('\\OC\\Files\\Storage\\Google', array('backend' => 'Google Drive', 'priority' => 100, 'configuration' => array('configured' => '#configured', 'client_id' => (string) $l->t('Client ID'), 'client_secret' => '*' . $l->t('Client secret'), 'token' => '#token'), 'custom' => 'google', 'has_dependencies' => true));
OC_Mount_Config::registerBackend('\\OC\\Files\\Storage\\Swift', array('backend' => (string) $l->t('OpenStack Object Storage'), 'priority' => 100, 'configuration' => array('user' => (string) $l->t('Username'), 'bucket' => (string) $l->t('Bucket'), 'region' => '&' . $l->t('Region (optional for OpenStack Object Storage)'), 'key' => '&*' . $l->t('API Key (required for Rackspace Cloud Files)'), 'tenant' => '&' . $l->t('Tenantname (required for OpenStack Object Storage)'), 'password' => '&*' . $l->t('Password (required for OpenStack Object Storage)'), 'service_name' => '&' . $l->t('Service Name (required for OpenStack Object Storage)'), 'url' => '&' . $l->t('URL of identity endpoint (required for OpenStack Object Storage)'), 'timeout' => '&' . $l->t('Timeout of HTTP requests in seconds')), 'has_dependencies' => true));
Beispiel #7
0
OC::$CLASSPATH['OC_Share_Backend_File'] = 'files_sharing/lib/share/file.php';
OC::$CLASSPATH['OC_Share_Backend_Folder'] = 'files_sharing/lib/share/folder.php';
OC::$CLASSPATH['OC\\Files\\Storage\\Shared'] = 'files_sharing/lib/sharedstorage.php';
OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Cache'] = 'files_sharing/lib/cache.php';
OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Permissions'] = 'files_sharing/lib/permissions.php';
OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Updater'] = 'files_sharing/lib/updater.php';
OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Watcher'] = 'files_sharing/lib/watcher.php';
OC::$CLASSPATH['OCA\\Files\\Share\\Maintainer'] = 'files_sharing/lib/maintainer.php';
OC::$CLASSPATH['OCA\\Files\\Share\\Proxy'] = 'files_sharing/lib/proxy.php';
// Exceptions
OC::$CLASSPATH['OCA\\Files_Sharing\\Exceptions\\BrokenPath'] = 'files_sharing/lib/exceptions.php';
\OCP\App::registerAdmin('files_sharing', 'settings-admin');
\OCA\Files_Sharing\Helper::registerHooks();
OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
OCP\Util::addTranslations('files_sharing');
OCP\Util::addScript('files_sharing', 'share');
OCP\Util::addScript('files_sharing', 'external');
OC_FileProxy::register(new OCA\Files\Share\Proxy());
\OC::$server->getActivityManager()->registerExtension(function () {
    return new \OCA\Files_Sharing\Activity();
});
$config = \OC::$server->getConfig();
if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
    \OCA\Files\App::getNavigationManager()->add(array("id" => 'sharingin', "appname" => 'files_sharing', "script" => 'list.php', "order" => 10, "name" => $l->t('Shared with you')));
    if (\OCP\Util::isSharingDisabledForUser() === false) {
        \OCA\Files\App::getNavigationManager()->add(array("id" => 'sharingout', "appname" => 'files_sharing', "script" => 'list.php', "order" => 15, "name" => $l->t('Shared with others')));
        // Check if sharing by link is enabled
        if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') {
            \OCA\Files\App::getNavigationManager()->add(array("id" => 'sharinglinks', "appname" => 'files_sharing', "script" => 'list.php', "order" => 20, "name" => $l->t('Shared by link')));
        }