dont show user provided auth as option for personal mounts
This commit is contained in:
parent
860d51487b
commit
5bdcd534b1
|
@ -836,8 +836,9 @@ MountConfigListView.prototype = _.extend({
|
|||
$tr.find('.backend').data('identifier', backend.identifier);
|
||||
|
||||
var selectAuthMechanism = $('<select class="selectAuthMechanism"></select>');
|
||||
var neededVisibility = (this._isPersonal) ? 1 : 2;
|
||||
$.each(this._allAuthMechanisms, function(authIdentifier, authMechanism) {
|
||||
if (backend.authSchemes[authMechanism.scheme]) {
|
||||
if (backend.authSchemes[authMechanism.scheme] && (authMechanism.visibility & neededVisibility)) {
|
||||
selectAuthMechanism.append(
|
||||
$('<option value="'+authMechanism.identifier+'" data-scheme="'+authMechanism.scheme+'">'+authMechanism.name+'</option>')
|
||||
);
|
||||
|
@ -1136,9 +1137,7 @@ MountConfigListView.prototype = _.extend({
|
|||
saveStorageConfig:function($tr, callback, concurrentTimer) {
|
||||
var self = this;
|
||||
var storage = this.getStorageConfig($tr);
|
||||
console.log(storage);
|
||||
if (!storage || !storage.validate()) {
|
||||
console.log('invalid');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ class AuthMechanism implements \JsonSerializable {
|
|||
$data += $this->jsonSerializeIdentifier();
|
||||
|
||||
$data['scheme'] = $this->getScheme();
|
||||
$data['visibility'] = $this->getVisibility();
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
namespace OCA\Files_External\Lib\Auth\Password;
|
||||
|
||||
use OCA\Files_External\Lib\DefinitionParameter;
|
||||
use OCA\Files_External\Service\BackendService;
|
||||
use OCP\IL10N;
|
||||
use OCP\IUser;
|
||||
use OCA\Files_External\Lib\Auth\AuthMechanism;
|
||||
|
@ -45,6 +46,7 @@ class UserProvided extends AuthMechanism {
|
|||
|
||||
$this
|
||||
->setIdentifier('password::userprovided')
|
||||
->setVisibility(BackendService::VISIBILITY_ADMIN)
|
||||
->setScheme(self::SCHEME_PASSWORD)
|
||||
->setText($l->t('User provided'))
|
||||
->addParameters([
|
||||
|
|
Loading…
Reference in New Issue