summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/command/user/add.php11
-rw-r--r--core/css/header.css5
-rw-r--r--core/js/sharedialogview.js8
-rw-r--r--core/js/tests/specs/sharedialogviewSpec.js37
-rw-r--r--core/l10n/de.js7
-rw-r--r--core/l10n/de.json7
-rw-r--r--core/l10n/he.js3
-rw-r--r--core/l10n/he.json3
8 files changed, 78 insertions, 3 deletions
diff --git a/core/command/user/add.php b/core/command/user/add.php
index cb0ab319bc0..6c7e3a47231 100644
--- a/core/command/user/add.php
+++ b/core/command/user/add.php
@@ -22,6 +22,7 @@
namespace OC\Core\Command\User;
+use OC\Files\Filesystem;
use OCP\IGroupManager;
use OCP\IUser;
use OCP\IUserManager;
@@ -131,7 +132,15 @@ class Add extends Command {
$output->writeln('Display name set to "' . $user->getDisplayName() . '"');
}
- foreach ($input->getOption('group') as $groupName) {
+ $groups = $input->getOption('group');
+
+ if (!empty($groups)) {
+ // Make sure we init the Filesystem for the user, in case we need to
+ // init some group shares.
+ Filesystem::init($user->getUID(), '');
+ }
+
+ foreach ($groups as $groupName) {
$group = $this->groupManager->get($groupName);
if (!$group) {
$this->groupManager->createGroup($groupName);
diff --git a/core/css/header.css b/core/css/header.css
index 4a5db088f96..5a5acb269ab 100644
--- a/core/css/header.css
+++ b/core/css/header.css
@@ -255,7 +255,10 @@
opacity: .1;
}
-
+#apps {
+ max-height: calc(100vh - 100px);
+ overflow:auto;
+}
/* USER MENU -----------------------------------------------------------------*/
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js
index e7435877cb3..fbb3a915810 100644
--- a/core/js/sharedialogview.js
+++ b/core/js/sharedialogview.js
@@ -281,6 +281,12 @@
.attr('disabled', false);
$loading.addClass('hidden')
.removeClass('inlineblock');
+ }, error: function(obj, msg) {
+ OC.Notification.showTemporary(msg);
+ $(e.target).attr('disabled', false)
+ .autocomplete('search', $(e.target).val());
+ $loading.addClass('hidden')
+ .removeClass('inlineblock');
}});
},
@@ -323,7 +329,7 @@
var $shareField = this.$el.find('.shareWithField');
if ($shareField.length) {
$shareField.autocomplete({
- minLength: 2,
+ minLength: 1,
delay: 750,
focus: function(event) {
event.preventDefault();
diff --git a/core/js/tests/specs/sharedialogviewSpec.js b/core/js/tests/specs/sharedialogviewSpec.js
index 3a94379789a..23214a7fe86 100644
--- a/core/js/tests/specs/sharedialogviewSpec.js
+++ b/core/js/tests/specs/sharedialogviewSpec.js
@@ -990,6 +990,43 @@ describe('OC.Share.ShareDialogView', function() {
addShareStub.restore();
});
+
+ it('calls addShare after selection and fail to share', function() {
+ dialog.render();
+
+ var shareWith = $('.shareWithField')[0];
+ var $shareWith = $(shareWith);
+ var addShareStub = sinon.stub(shareModel, 'addShare');
+ var autocompleteOptions = autocompleteStub.getCall(0).args[0];
+ autocompleteOptions.select(new $.Event('select', {target: shareWith}), {
+ item: {
+ label: 'User Two',
+ value: {
+ shareType: OC.Share.SHARE_TYPE_USER,
+ shareWith: 'user2'
+ }
+ }
+ });
+
+ expect(addShareStub.calledOnce).toEqual(true);
+ expect(addShareStub.firstCall.args[0]).toEqual({
+ shareType: OC.Share.SHARE_TYPE_USER,
+ shareWith: 'user2'
+ });
+
+ //Input is locked
+ expect($shareWith.val()).toEqual('User Two');
+ expect($shareWith.attr('disabled')).toEqual('disabled');
+
+ //Callback is called
+ addShareStub.firstCall.args[1].error();
+
+ //Input is unlocked
+ expect($shareWith.val()).toEqual('User Two');
+ expect($shareWith.attr('disabled')).toEqual(undefined);
+
+ addShareStub.restore();
+ });
});
describe('reshare permissions', function() {
it('does not show sharing options when sharing not allowed', function() {
diff --git a/core/l10n/de.js b/core/l10n/de.js
index ec2943c2b14..d871a0ce329 100644
--- a/core/l10n/de.js
+++ b/core/l10n/de.js
@@ -154,11 +154,18 @@ OC.L10N.register(
"change" : "Ändern",
"delete" : "löschen",
"access control" : "Zugriffskontrolle",
+ "Could not unshare" : "Freigabe konnte nicht entfernt werden",
+ "Share details could not be loaded for this item." : "Details der geteilten Freigabe konnten nicht geladen werden zu diesem Eintrag.",
+ "No users or groups found for {search}" : "Kein Benutzer oder Gruppen gefunden für {search}",
"An error occured. Please try again" : "Es ist ein Fehler aufgetreten. Bitte versuche es noch einmal",
+ "{sharee} (group)" : "{sharee} (group)",
+ "{sharee} (at {server})" : "{sharee} (at {server})",
+ "{sharee} (remote)" : "{sharee} (remote)",
"Share" : "Teilen",
"Share with people on other ownClouds using the syntax username@example.com/owncloud" : "Mit Benutzern anderer ownClouds unter Verwendung der Syntax benutzername@beispiel.com/owncloud teilen",
"Share with users or groups …" : "Mit Benutzern oder Gruppen teilen…",
"Share with users, groups or remote users …" : "Mit Benutzern, Gruppen oder entfernten Benutzern teilen…",
+ "Error removing share" : "Fehler beim Entfernen der Freigabe",
"Warning" : "Warnung",
"Error while sending notification" : "Fehler beim Senden der Benachrichtigung",
"Non-existing tag #{tag}" : "Nicht vorhandener Tag #{tag}",
diff --git a/core/l10n/de.json b/core/l10n/de.json
index 39af5b7c4c6..145867d2b45 100644
--- a/core/l10n/de.json
+++ b/core/l10n/de.json
@@ -152,11 +152,18 @@
"change" : "Ändern",
"delete" : "löschen",
"access control" : "Zugriffskontrolle",
+ "Could not unshare" : "Freigabe konnte nicht entfernt werden",
+ "Share details could not be loaded for this item." : "Details der geteilten Freigabe konnten nicht geladen werden zu diesem Eintrag.",
+ "No users or groups found for {search}" : "Kein Benutzer oder Gruppen gefunden für {search}",
"An error occured. Please try again" : "Es ist ein Fehler aufgetreten. Bitte versuche es noch einmal",
+ "{sharee} (group)" : "{sharee} (group)",
+ "{sharee} (at {server})" : "{sharee} (at {server})",
+ "{sharee} (remote)" : "{sharee} (remote)",
"Share" : "Teilen",
"Share with people on other ownClouds using the syntax username@example.com/owncloud" : "Mit Benutzern anderer ownClouds unter Verwendung der Syntax benutzername@beispiel.com/owncloud teilen",
"Share with users or groups …" : "Mit Benutzern oder Gruppen teilen…",
"Share with users, groups or remote users …" : "Mit Benutzern, Gruppen oder entfernten Benutzern teilen…",
+ "Error removing share" : "Fehler beim Entfernen der Freigabe",
"Warning" : "Warnung",
"Error while sending notification" : "Fehler beim Senden der Benachrichtigung",
"Non-existing tag #{tag}" : "Nicht vorhandener Tag #{tag}",
diff --git a/core/l10n/he.js b/core/l10n/he.js
index b7375c46792..6498f5caf5a 100644
--- a/core/l10n/he.js
+++ b/core/l10n/he.js
@@ -168,6 +168,9 @@ OC.L10N.register(
"Share details could not be loaded for this item." : "לא ניתן היה לטעון מידע שיתוף לפריט זה",
"No users or groups found for {search}" : "לא אותרו משתמשים או קבוצות עבור {search}",
"An error occured. Please try again" : "אירעה שגיאה. יש לנסות בבקשה שוב",
+ "{sharee} (group)" : "{sharee} (קבוצה)",
+ "{sharee} (at {server})" : "{sharee} (ב- {server})",
+ "{sharee} (remote)" : "{sharee} (מרוחק)",
"Share" : "שתף",
"Share with people on other ownClouds using the syntax username@example.com/owncloud" : "ניתן לשתף עם אנשים אחרים המשתמשים ב- ownClouds בעזרת הפורמט הבא username@example.com/owncloud",
"Share with users or groups …" : "שיתוף עם משתמשים או קבוצות...",
diff --git a/core/l10n/he.json b/core/l10n/he.json
index e10e94b77fa..d0b0fff51e9 100644
--- a/core/l10n/he.json
+++ b/core/l10n/he.json
@@ -166,6 +166,9 @@
"Share details could not be loaded for this item." : "לא ניתן היה לטעון מידע שיתוף לפריט זה",
"No users or groups found for {search}" : "לא אותרו משתמשים או קבוצות עבור {search}",
"An error occured. Please try again" : "אירעה שגיאה. יש לנסות בבקשה שוב",
+ "{sharee} (group)" : "{sharee} (קבוצה)",
+ "{sharee} (at {server})" : "{sharee} (ב- {server})",
+ "{sharee} (remote)" : "{sharee} (מרוחק)",
"Share" : "שתף",
"Share with people on other ownClouds using the syntax username@example.com/owncloud" : "ניתן לשתף עם אנשים אחרים המשתמשים ב- ownClouds בעזרת הפורמט הבא username@example.com/owncloud",
"Share with users or groups …" : "שיתוף עם משתמשים או קבוצות...",