Skip to content

Commit

Permalink
Rename user to account in files_external
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Petry <[email protected]>
  • Loading branch information
PVince81 committed Sep 21, 2022
1 parent 59f9b15 commit 5451c61
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions apps/files_external/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<name>External storage support</name>
<summary>Adds basic external storage support</summary>
<description>
This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administrators can choose which types of storage to enable and can mount these storage locations for a user, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows users to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.
This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administrators can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.

External storage can be configured using the GUI or at the command line. This second option provides the advanced user with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation.
External storage can be configured using the GUI or at the command line. This second option provides administrators with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation.
</description>
<version>1.17.0</version>
<licence>agpl</licence>
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function addSelect2 ($elements, userListLimit) {
return;
}
$elements.select2({
placeholder: t('files_external', 'All users. Type to select user or group.'),
placeholder: t('files_external', 'All accounts. Type to select account or group.'),
allowClear: true,
multiple: true,
toggleSelect: true,
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/js/statusmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ OCA.Files_External.StatusManager = {
credentials_text: t('files_external', 'Please enter the credentials for the {mount} mount', {
'mount': mountPoint
}),
placeholder_username: t('files_external', 'Username'),
placeholder_username: t('files_external', 'Account name'),
placeholder_password: t('files_external', 'Password')
}));

Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Command/Notify.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
} catch (\Exception $e) {
$output->writeln('<error>Error while trying to create storage</error>');
if ($noAuth) {
$output->writeln('<error>Username and/or password required</error>');
$output->writeln('<error>Account name and/or password required</error>');
}
return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function update(
} else {
return new DataResponse(
[
'message' => $this->l10n->t('Storage with ID "%d" is not user editable', [$id])
'message' => $this->l10n->t('Storage with ID "%d" is not editable by non-admins', [$id])
],
Http::STATUS_FORBIDDEN
);
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV2.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(IL10N $l) {
->setScheme(self::SCHEME_OPENSTACK)
->setText($l->t('OpenStack v2'))
->addParameters([
new DefinitionParameter('user', $l->t('Username')),
new DefinitionParameter('user', $l->t('Account name')),
(new DefinitionParameter('password', $l->t('Password')))
->setType(DefinitionParameter::VALUE_PASSWORD),
new DefinitionParameter('tenant', $l->t('Tenant name')),
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(IL10N $l) {
->setScheme(self::SCHEME_OPENSTACK)
->setText($l->t('OpenStack v3'))
->addParameters([
new DefinitionParameter('user', $l->t('Username')),
new DefinitionParameter('user', $l->t('Account name')),
new DefinitionParameter('domain', $l->t('Domain')),
(new DefinitionParameter('password', $l->t('Password')))
->setType(DefinitionParameter::VALUE_PASSWORD),
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(IL10N $l) {
->setScheme(self::SCHEME_OPENSTACK)
->setText($l->t('Rackspace'))
->addParameters([
new DefinitionParameter('user', $l->t('Username')),
new DefinitionParameter('user', $l->t('Account name')),
(new DefinitionParameter('key', $l->t('API key')))
->setType(DefinitionParameter::VALUE_PASSWORD),
])
Expand Down
4 changes: 2 additions & 2 deletions apps/files_external/lib/Lib/Auth/Password/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public function __construct(IL10N $l) {
$this
->setIdentifier('password::password')
->setScheme(self::SCHEME_PASSWORD)
->setText($l->t('Username and password'))
->setText($l->t('Account name and password'))
->addParameters([
new DefinitionParameter('user', $l->t('Username')),
new DefinitionParameter('user', $l->t('Account name')),
(new DefinitionParameter('password', $l->t('Password')))
->setType(DefinitionParameter::VALUE_PASSWORD),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(IL10N $l, ICredentialsManager $credentialsManager) {
->setIdentifier('password::global::user')
->setVisibility(BackendService::VISIBILITY_DEFAULT)
->setScheme(self::SCHEME_PASSWORD)
->setText($l->t('Global credentials, user entered'));
->setText($l->t('Global credentials, manually entered'));
}

public function saveBackendOptions(IUser $user, $id, $backendOptions) {
Expand Down
4 changes: 2 additions & 2 deletions apps/files_external/lib/Lib/Auth/Password/UserProvided.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public function __construct(IL10N $l, ICredentialsManager $credentialsManager) {
->setIdentifier('password::userprovided')
->setVisibility(BackendService::VISIBILITY_ADMIN)
->setScheme(self::SCHEME_PASSWORD)
->setText($l->t('User entered, store in database'))
->setText($l->t('Manually entered, store in database'))
->addParameters([
(new DefinitionParameter('user', $l->t('Username')))
(new DefinitionParameter('user', $l->t('Account name')))
->setFlag(DefinitionParameter::FLAG_USER_PROVIDED),
(new DefinitionParameter('password', $l->t('Password')))
->setType(DefinitionParameter::VALUE_PASSWORD)
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Auth/PublicKey/RSA.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(IL10N $l, IConfig $config) {
->setScheme(self::SCHEME_PUBLICKEY)
->setText($l->t('RSA public key'))
->addParameters([
new DefinitionParameter('user', $l->t('Username')),
new DefinitionParameter('user', $l->t('Account name')),
new DefinitionParameter('public_key', $l->t('Public key')),
(new DefinitionParameter('private_key', 'private_key'))
->setType(DefinitionParameter::VALUE_HIDDEN),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct(IL10N $l, IConfig $config) {
->setScheme(self::SCHEME_PUBLICKEY)
->setText($l->t('RSA private key'))
->addParameters([
new DefinitionParameter('user', $l->t('Username')),
new DefinitionParameter('user', $l->t('Account name')),
(new DefinitionParameter('password', $l->t('Password')))
->setFlag(DefinitionParameter::FLAG_OPTIONAL)
->setType(DefinitionParameter::VALUE_PASSWORD),
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Backend/SMB.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct(IL10N $l, Password $legacyAuth) {
(new DefinitionParameter('check_acl', $l->t('Verify ACL access when listing files')))
->setType(DefinitionParameter::VALUE_BOOLEAN)
->setFlag(DefinitionParameter::FLAG_OPTIONAL)
->setTooltip($l->t("Check the ACL's of each file or folder inside a directory to filter out items where the user has no read permissions, comes with a performance penalty")),
->setTooltip($l->t("Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty")),
(new DefinitionParameter('timeout', $l->t('Timeout')))
->setType(DefinitionParameter::VALUE_HIDDEN)
->setFlag(DefinitionParameter::FLAG_OPTIONAL),
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Backend/SMB_OC.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct(IL10N $l, SessionCredentials $legacyAuth, SMB $smbBa
->setText($l->t('SMB/CIFS using OC login'))
->addParameters([
new DefinitionParameter('host', $l->t('Host')),
(new DefinitionParameter('username_as_share', $l->t('Username as share')))
(new DefinitionParameter('username_as_share', $l->t('Account name as share')))
->setType(DefinitionParameter::VALUE_BOOLEAN),
(new DefinitionParameter('share', $l->t('Share')))
->setFlag(DefinitionParameter::FLAG_OPTIONAL),
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Storage/Swift.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function __construct($params) {
or (empty($params['user']) && empty($params['userid'])) or empty($params['bucket'])
or empty($params['region'])
) {
throw new StorageBadConfigException("API Key or password, Username, Bucket and Region have to be configured.");
throw new StorageBadConfigException("API Key or password, Account name, Bucket and Region have to be configured.");
}

$user = $params['user'];
Expand Down
6 changes: 3 additions & 3 deletions apps/files_external/templates/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function writeParameterInput($parameter, $options, $classes = []) {
<form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" data-can-create-local="<?php echo $canCreateNewLocalStorage?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>">
<h2 class="inlineblock" data-anchor-name="external-storage"><?php p($l->t('External storage')); ?></h2>
<a target="_blank" rel="noreferrer" class="icon-info" title="<?php p($l->t('Open documentation'));?>" href="<?php p(link_to_docs('admin-external-storage')); ?>"></a>
<p class="settings-hint"><?php p($l->t('External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow users to mount their own external storage services.')); ?></p>
<p class="settings-hint"><?php p($l->t('External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services.')); ?></p>
<?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) {
print_unescaped(''.$_['dependencies'].'');
} ?>
Expand Down Expand Up @@ -188,7 +188,7 @@ function writeParameterInput($parameter, $options, $classes = []) {
value="1" <?php if ($_['allowUserMounting']) {
print_unescaped(' checked="checked"');
} ?> />
<label for="allowUserMounting"><?php p($l->t('Allow users to mount external storage')); ?></label> <span id="userMountingMsg" class="msg"></span>
<label for="allowUserMounting"><?php p($l->t('Allow people to mount external storage')); ?></label> <span id="userMountingMsg" class="msg"></span>

<p id="userMountingBackends"<?php if (!$_['allowUserMounting']): ?> class="hidden"<?php endif; ?>>
<?php
Expand Down Expand Up @@ -219,7 +219,7 @@ function writeParameterInput($parameter, $options, $classes = []) {
<input type="text" name="username"
autocomplete="false"
value="<?php p($_['globalCredentials']['user']); ?>"
placeholder="<?php p($l->t('Username')) ?>"/>
placeholder="<?php p($l->t('Account name')) ?>"/>
<input type="password" name="password"
autocomplete="false"
value="<?php p($_['globalCredentials']['password']); ?>"
Expand Down

0 comments on commit 5451c61

Please sign in to comment.