summaryrefslogtreecommitdiffstats
path: root/apps/files_external/js/settings.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-01-19 16:57:20 +0100
committerRobin Appelman <icewind@owncloud.com>2016-01-29 14:51:30 +0100
commit03c79ac24fdda8c32177aaf25851a4ad069e6517 (patch)
treed9ac29445a1f65de4869498d42eb17cb2739c55a /apps/files_external/js/settings.js
parent5bdcd534b18ce842c6775f588c9a7330a82ed89d (diff)
downloadnextcloud-server-03c79ac24fdda8c32177aaf25851a4ad069e6517.tar.gz
nextcloud-server-03c79ac24fdda8c32177aaf25851a4ad069e6517.zip
remove custom controler for user provided password auth
Diffstat (limited to 'apps/files_external/js/settings.js')
-rw-r--r--apps/files_external/js/settings.js36
1 files changed, 5 insertions, 31 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 52b46db6cc0..94d0fc2f5a7 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -447,34 +447,7 @@ var UserGlobalStorageConfig = function (id) {
UserGlobalStorageConfig.prototype = _.extend({}, StorageConfig.prototype,
/** @lends OCA.External.Settings.UserStorageConfig.prototype */ {
- _url: 'apps/files_external/userglobalstorages',
-
- /**
- * Creates or saves the storage.
- *
- * @param {Function} [options.success] success callback, receives result as argument
- * @param {Function} [options.error] error callback
- */
- save: function (options) {
- var self = this;
- var url = OC.generateUrl('apps/files_external/usercredentials/{id}', {id: this.id});
-
- $.ajax({
- type: 'PUT',
- url: url,
- contentType: 'application/json',
- data: JSON.stringify({
- username: this.backendOptions.user,
- password: this.backendOptions.password
- }),
- success: function (result) {
- if (_.isFunction(options.success)) {
- options.success(result);
- }
- },
- error: options.error
- });
- }
+ _url: 'apps/files_external/userglobalstorages'
});
/**
@@ -914,9 +887,10 @@ MountConfigListView.prototype = _.extend({
var onCompletion = jQuery.Deferred();
$.each(result, function(i, storageParams) {
var storageConfig;
- var isUserProvidedAuth = storageParams.authMechanism === 'password::userprovided';
+ console.log(storageParams);
+ var isUserGlobal = storageParams.type === 'system' && self._isPersonal;
storageParams.mountPoint = storageParams.mountPoint.substr(1); // trim leading slash
- if (isUserProvidedAuth) {
+ if (isUserGlobal) {
storageConfig = new UserGlobalStorageConfig();
} else {
storageConfig = new self._storageConfigClass();
@@ -935,7 +909,7 @@ MountConfigListView.prototype = _.extend({
$tr.find('.mountOptionsToggle, .remove').empty();
$tr.find('input:not(.user_provided), select:not(.user_provided)').attr('disabled', 'disabled');
- if (isUserProvidedAuth) {
+ if (isUserGlobal) {
$tr.find('.configuration').find(':not(.user_provided)').remove();
} else {
// userglobal storages do not expose configuration data