Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 74 additions & 74 deletions core/js/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/js/dist/share_backend.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/share_backend.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion core/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ Object.assign(window.OC, {
* @deprecated use {@link OC.getCurrentUser} instead
*/
currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false,
appConfig: window.oc_appconfig || {},
theme: window.oc_defaults || {},
coreApps:['', 'admin','log','core/search','settings','core','3rdparty'],
requestToken: oc_requesttoken,
Expand Down
24 changes: 12 additions & 12 deletions core/js/shareconfigmodel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
*/

/* global moment, oc_appconfig */
/* global moment, OC */

(function() {
if (!OC.Share) {
Expand All @@ -21,16 +21,16 @@
var ShareConfigModel = OC.Backbone.Model.extend({
defaults: {
publicUploadEnabled: false,
enforcePasswordForPublicLink: oc_appconfig.core.enforcePasswordForPublicLink,
enableLinkPasswordByDefault: oc_appconfig.core.enableLinkPasswordByDefault,
isDefaultExpireDateEnforced: oc_appconfig.core.defaultExpireDateEnforced === true,
isDefaultExpireDateEnabled: oc_appconfig.core.defaultExpireDateEnabled === true,
isRemoteShareAllowed: oc_appconfig.core.remoteShareAllowed,
isMailShareAllowed: oc_appconfig.shareByMailEnabled !== undefined,
defaultExpireDate: oc_appconfig.core.defaultExpireDate,
isResharingAllowed: oc_appconfig.core.resharingAllowed,
isPasswordForMailSharesRequired: (oc_appconfig.shareByMail === undefined) ? false : oc_appconfig.shareByMail.enforcePasswordProtection,
allowGroupSharing: oc_appconfig.core.allowGroupSharing
enforcePasswordForPublicLink: OC.appConfig.core.enforcePasswordForPublicLink,
enableLinkPasswordByDefault: OC.appConfig.core.enableLinkPasswordByDefault,
isDefaultExpireDateEnforced: OC.appConfig.core.defaultExpireDateEnforced === true,
isDefaultExpireDateEnabled: OC.appConfig.core.defaultExpireDateEnabled === true,
isRemoteShareAllowed: OC.appConfig.core.remoteShareAllowed,
isMailShareAllowed: OC.appConfig.shareByMailEnabled !== undefined,
defaultExpireDate: OC.appConfig.core.defaultExpireDate,
isResharingAllowed: OC.appConfig.core.resharingAllowed,
isPasswordForMailSharesRequired: (OC.appConfig.shareByMail === undefined) ? false : OC.appConfig.shareByMail.enforcePasswordProtection,
allowGroupSharing: OC.appConfig.core.allowGroupSharing
},

/**
Expand All @@ -52,7 +52,7 @@
* @returns {string}
*/
getFederatedShareDocLink: function() {
return oc_appconfig.core.federatedCloudShareDoc;
return OC.appConfig.core.federatedCloudShareDoc;
},

getDefaultExpirationDateString: function () {
Expand Down
2 changes: 1 addition & 1 deletion core/js/tests/specHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ OC.config = {
session_keepalive: false,
blacklist_files_regex: '\.(part|filepart)$',
};
window.oc_appconfig = {
OC.appConfig = {
core: {}
};
window.oc_defaults = {
Expand Down
1 change: 0 additions & 1 deletion core/js/tests/specs/shareSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*
*/

/* global oc_appconfig */
describe('OC.Share tests', function() {
describe('markFileAsShared', function() {
var $file;
Expand Down
7 changes: 3 additions & 4 deletions core/js/tests/specs/sharedialogshareelistview.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*
*/

/* global oc_appconfig */
describe('OC.Share.ShareDialogShareeListView', function () {

var oldCurrentUser;
Expand All @@ -31,8 +30,8 @@ describe('OC.Share.ShareDialogShareeListView', function () {

beforeEach(function () {
/* jshint camelcase:false */
oldAppConfig = _.extend({}, oc_appconfig.core);
oc_appconfig.core.enforcePasswordForPublicLink = false;
oldAppConfig = _.extend({}, OC.appConfig.core);
OC.appConfig.core.enforcePasswordForPublicLink = false;

fileInfoModel = new OCA.Files.FileInfoModel({
id: 123,
Expand Down Expand Up @@ -84,7 +83,7 @@ describe('OC.Share.ShareDialogShareeListView', function () {
afterEach(function () {
OC.currentUser = oldCurrentUser;
/* jshint camelcase:false */
oc_appconfig.core = oldAppConfig;
OC.appConfig.core = oldAppConfig;
listView.remove();
updateShareStub.restore();
});
Expand Down
8 changes: 4 additions & 4 deletions core/js/tests/specs/sharedialogviewSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
*/

/* global oc_appconfig, sinon */
/* global sinon, OC */
describe('OC.Share.ShareDialogView', function() {
var $container;
var oldConfig;
Expand All @@ -44,8 +44,8 @@ describe('OC.Share.ShareDialogView', function() {
oldConfig = OC.config;
OC.config['sharing.maxAutocompleteResults'] = 0;
/* jshint camelcase:false */
oldAppConfig = _.extend({}, oc_appconfig.core);
oc_appconfig.core.enforcePasswordForPublicLink = false;
oldAppConfig = _.extend({}, OC.appConfig.core);
OC.appConfig.core.enforcePasswordForPublicLink = false;

fetchStub = sinon.stub(OC.Share.ShareItemModel.prototype, 'fetch');
saveLinkShareStub = sinon.stub(OC.Share.ShareItemModel.prototype, 'saveLinkShare');
Expand Down Expand Up @@ -113,7 +113,7 @@ describe('OC.Share.ShareDialogView', function() {
OC.currentUser = oldCurrentUser;
OC.config = oldConfig;
/* jshint camelcase:false */
oc_appconfig.core = oldAppConfig;
OC.appConfig.core = oldAppConfig;

dialog.remove();
fetchStub.restore();
Expand Down
5 changes: 3 additions & 2 deletions core/js/tests/specs/shareitemmodelSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
*
*/

/* global oc_appconfig */
/* global OC */

describe('OC.Share.ShareItemModel', function() {
var fetchSharesStub, fetchReshareStub;
var fetchSharesDeferred, fetchReshareDeferred;
Expand Down Expand Up @@ -492,7 +493,7 @@ describe('OC.Share.ShareItemModel', function() {

describe('share permissions', function() {
beforeEach(function() {
oc_appconfig.core.resharingAllowed = true;
OC.appConfig.core.resharingAllowed = true;
});

/**
Expand Down
4 changes: 2 additions & 2 deletions core/src/OC/appconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
*
*/

import OCP from '../OCP/index';

import {getValue, setValue, getApps, getKeys, deleteKey} from '../OCP/appconfig'

export const appConfig = window.oc_appconfig || {}

/**
* @namespace
* @deprecated 16.0.0 Use OCP.AppConfig instead
Expand Down
3 changes: 2 additions & 1 deletion core/src/OC/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

import Apps from './apps'
import AppConfig from './appconfig'
import {AppConfig, appConfig} from './appconfig'
import Backbone from './backbone'
import Config from './config'
import ContactsMenu from './contactsmenu'
Expand Down Expand Up @@ -49,6 +49,7 @@ import {redirect, reload} from './navigation'
export default {
Apps,
AppConfig,
appConfig,
Backbone,
ContactsMenu,
config: Config,
Expand Down
2 changes: 1 addition & 1 deletion settings/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ $(document).ready(function(){
// run setup checks then gather error messages
$.when(
OC.SetupChecks.checkWebDAV(),
OC.SetupChecks.checkWellKnownUrl('/.well-known/webfinger', oc_defaults.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true && !!oc_appconfig.core.public_webfinger, [200, 501]),
OC.SetupChecks.checkWellKnownUrl('/.well-known/webfinger', oc_defaults.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true && !!OC.appConfig.core.public_webfinger, [200, 501]),
OC.SetupChecks.checkWellKnownUrl('/.well-known/caldav', oc_defaults.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),
OC.SetupChecks.checkWellKnownUrl('/.well-known/carddav', oc_defaults.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),
OC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocm-provider/', oc_defaults.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),
Expand Down