summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/tests/js/filelistSpec.js4
-rw-r--r--apps/files_sharing/lib/API/Share20OCS.php8
-rw-r--r--apps/systemtags/l10n/es.js9
-rw-r--r--apps/systemtags/l10n/es.json9
-rw-r--r--apps/theming/lib/Controller/ThemingController.php6
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php22
-rw-r--r--build/integration/features/sharing-v1.feature16
-rw-r--r--core/css/inputs.css14
-rw-r--r--core/js/apps.js13
-rw-r--r--core/js/tests/specs/appsSpec.js4
-rw-r--r--core/templates/login.php4
-rw-r--r--lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php2
-rw-r--r--lib/private/Authentication/Token/DefaultTokenCleanupJob.php5
-rw-r--r--lib/private/Authentication/Token/IProvider.php5
-rw-r--r--settings/l10n/it.js1
-rw-r--r--settings/l10n/it.json1
-rw-r--r--tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php3
17 files changed, 96 insertions, 30 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index 97fa9804a22..651ba6eef1e 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -2063,6 +2063,7 @@ describe('OCA.Files.FileList tests', function() {
expect(fileList._detailsView.getFileInfo()).toEqual(null);
});
it('closes sidebar whenever the currently highlighted file was removed from the list', function() {
+ jQuery.fx.off = true;
var $tr = fileList.findFileEl('One.txt');
$tr.find('td.filename>a.name').click();
expect($tr.hasClass('highlighted')).toEqual(true);
@@ -2072,6 +2073,7 @@ describe('OCA.Files.FileList tests', function() {
expect($('#app-sidebar').hasClass('disappear')).toEqual(false);
fileList.remove('One.txt');
expect($('#app-sidebar').hasClass('disappear')).toEqual(true);
+ jQuery.fx.off = false;
});
it('returns the currently selected model instance when calling getModelForFile', function() {
var $tr = fileList.findFileEl('One.txt');
@@ -2088,12 +2090,14 @@ describe('OCA.Files.FileList tests', function() {
expect(model3).toEqual(model1);
});
it('closes the sidebar when switching folders', function() {
+ jQuery.fx.off = true;
var $tr = fileList.findFileEl('One.txt');
$tr.find('td.filename>a.name').click();
expect($('#app-sidebar').hasClass('disappear')).toEqual(false);
fileList.changeDirectory('/another');
expect($('#app-sidebar').hasClass('disappear')).toEqual(true);
+ jQuery.fx.off = false;
});
});
describe('File actions', function() {
diff --git a/apps/files_sharing/lib/API/Share20OCS.php b/apps/files_sharing/lib/API/Share20OCS.php
index fd5e5ddc786..593e9d877c7 100644
--- a/apps/files_sharing/lib/API/Share20OCS.php
+++ b/apps/files_sharing/lib/API/Share20OCS.php
@@ -224,7 +224,7 @@ class Share20OCS {
return new \OC_OCS_Result(null, 404, 'could not delete share');
}
- if (!$this->canAccessShare($share)) {
+ if (!$this->canAccessShare($share, false)) {
$share->getNode()->unlock(ILockingProvider::LOCK_SHARED);
return new \OC_OCS_Result(null, 404, $this->l->t('Could not delete share'));
}
@@ -573,7 +573,7 @@ class Share20OCS {
$share->getNode()->lock(\OCP\Lock\ILockingProvider::LOCK_SHARED);
- if (!$this->canAccessShare($share)) {
+ if (!$this->canAccessShare($share, false)) {
$share->getNode()->unlock(ILockingProvider::LOCK_SHARED);
return new \OC_OCS_Result(null, 404, $this->l->t('Wrong share ID, share doesn\'t exist'));
}
@@ -703,7 +703,7 @@ class Share20OCS {
* @param \OCP\Share\IShare $share
* @return bool
*/
- protected function canAccessShare(\OCP\Share\IShare $share) {
+ protected function canAccessShare(\OCP\Share\IShare $share, $checkGroups = true) {
// A file with permissions 0 can't be accessed by us. So Don't show it
if ($share->getPermissions() === 0) {
return false;
@@ -722,7 +722,7 @@ class Share20OCS {
return true;
}
- if ($share->getShareType() === \OCP\Share::SHARE_TYPE_GROUP) {
+ if ($checkGroups && $share->getShareType() === \OCP\Share::SHARE_TYPE_GROUP) {
$sharedWith = $this->groupManager->get($share->getSharedWith());
if ($sharedWith->inGroup($this->currentUser)) {
return true;
diff --git a/apps/systemtags/l10n/es.js b/apps/systemtags/l10n/es.js
index a261ab3a162..08dce10c27b 100644
--- a/apps/systemtags/l10n/es.js
+++ b/apps/systemtags/l10n/es.js
@@ -2,6 +2,9 @@ OC.L10N.register(
"systemtags",
{
"Tags" : "Etiquetas",
+ "Update" : "Actualizar",
+ "Create" : "Crear",
+ "Select tag…" : "Seleccionar etiqueta...",
"Tagged files" : "Archivos etiquetados",
"Select tags to filter by" : "Seleccionar etiquetas por las que filtrar",
"Please select tags to filter by" : "Por favor, seleccione las etiquetas por las que desea filtrar",
@@ -23,7 +26,13 @@ OC.L10N.register(
"%1$s unassigned system tag %3$s from %2$s" : "%1$s eliminó la asignación de etiqueta de sistema %3$s de %2$s",
"%s (restricted)" : "%s (restringido)",
"%s (invisible)" : "%s (invisible)",
+ "Collaborative tags" : "Etiquetas colaborativas",
"Name" : "Nombre",
+ "Delete" : "Borrar",
+ "Public" : "Público",
+ "Restricted" : "Restringido",
+ "Invisible" : "Invisible",
+ "Reset" : "Reiniciar",
"No files in here" : "Aquí no hay archivos",
"No entries found in this folder" : "No hay entradas en esta carpeta",
"Size" : "Tamaño",
diff --git a/apps/systemtags/l10n/es.json b/apps/systemtags/l10n/es.json
index 6c0a32910ea..695f6a0fcbd 100644
--- a/apps/systemtags/l10n/es.json
+++ b/apps/systemtags/l10n/es.json
@@ -1,5 +1,8 @@
{ "translations": {
"Tags" : "Etiquetas",
+ "Update" : "Actualizar",
+ "Create" : "Crear",
+ "Select tag…" : "Seleccionar etiqueta...",
"Tagged files" : "Archivos etiquetados",
"Select tags to filter by" : "Seleccionar etiquetas por las que filtrar",
"Please select tags to filter by" : "Por favor, seleccione las etiquetas por las que desea filtrar",
@@ -21,7 +24,13 @@
"%1$s unassigned system tag %3$s from %2$s" : "%1$s eliminó la asignación de etiqueta de sistema %3$s de %2$s",
"%s (restricted)" : "%s (restringido)",
"%s (invisible)" : "%s (invisible)",
+ "Collaborative tags" : "Etiquetas colaborativas",
"Name" : "Nombre",
+ "Delete" : "Borrar",
+ "Public" : "Público",
+ "Restricted" : "Restringido",
+ "Invisible" : "Invisible",
+ "Reset" : "Reiniciar",
"No files in here" : "Aquí no hay archivos",
"No entries found in this folder" : "No hay entradas en esta carpeta",
"Size" : "Tamaño",
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php
index f788261b747..8d9869b84a7 100644
--- a/apps/theming/lib/Controller/ThemingController.php
+++ b/apps/theming/lib/Controller/ThemingController.php
@@ -288,10 +288,10 @@ class ThemingController extends Controller {
"}\n";
$responseCss .= '
#firstrunwizard .firstrunwizard-header {
- background-color: ' . $color . ';
+ background-color: ' . $color . ';
}
#firstrunwizard p a {
- color: ' . $color . ';
+ color: ' . $color . ';
}
';
@@ -300,7 +300,7 @@ class ThemingController extends Controller {
if($logo !== '') {
$responseCss .= sprintf(
'#header .logo {' .
- 'background-image: url(\'./logo?v='.$cacheBusterValue.'\')' .
+ 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');' .
'background-size: contain;' .
'}' . "\n" .
'#header .logo-icon {' .
diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php
index 0f42e252400..82eb8259af5 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -386,10 +386,10 @@ class ThemingControllerTest extends TestCase {
$expectedData .= '
#firstrunwizard .firstrunwizard-header {
- background-color: ' . $color . ';
+ background-color: ' . $color . ';
}
#firstrunwizard p a {
- color: ' . $color . ';
+ color: ' . $color . ';
}
';
@@ -442,10 +442,10 @@ class ThemingControllerTest extends TestCase {
$expectedData .= '
#firstrunwizard .firstrunwizard-header {
- background-color: ' . $color . ';
+ background-color: ' . $color . ';
}
#firstrunwizard p a {
- color: ' . $color . ';
+ color: ' . $color . ';
}
';
$expectedData .= '#header .header-appname, #expandDisplayName { color: #000000; }' . "\n";
@@ -484,7 +484,7 @@ class ThemingControllerTest extends TestCase {
->willReturn('');
$expectedData = '#header .logo {' .
- 'background-image: url(\'./logo?v=0\')' .
+ 'background-image: url(\'./logo?v=0\');' .
'background-size: contain;' .
'}' . "\n" .
'#header .logo-icon {' .
@@ -579,15 +579,15 @@ class ThemingControllerTest extends TestCase {
"}\n";
$expectedData .= '
#firstrunwizard .firstrunwizard-header {
- background-color: ' . $color . ';
+ background-color: ' . $color . ';
}
#firstrunwizard p a {
- color: ' . $color . ';
+ color: ' . $color . ';
}
';
$expectedData .= sprintf(
'#header .logo {' .
- 'background-image: url(\'./logo?v=0\')' .
+ 'background-image: url(\'./logo?v=0\');' .
'background-size: contain;' .
'}' . "\n" .
'#header .logo-icon {' .
@@ -652,15 +652,15 @@ class ThemingControllerTest extends TestCase {
"}\n";
$expectedData .= '
#firstrunwizard .firstrunwizard-header {
- background-color: ' . $color . ';
+ background-color: ' . $color . ';
}
#firstrunwizard p a {
- color: ' . $color . ';
+ color: ' . $color . ';
}
';
$expectedData .= sprintf(
'#header .logo {' .
- 'background-image: url(\'./logo?v=0\')' .
+ 'background-image: url(\'./logo?v=0\');' .
'background-size: contain;' .
'}' . "\n" .
'#header .logo-icon {' .
diff --git a/build/integration/features/sharing-v1.feature b/build/integration/features/sharing-v1.feature
index 16d04e81330..94d12ce3e72 100644
--- a/build/integration/features/sharing-v1.feature
+++ b/build/integration/features/sharing-v1.feature
@@ -759,3 +759,19 @@ Feature: sharing
| shareType | 0 |
Then the OCS status code should be "997"
And the HTTP status code should be "401"
+
+ Scenario: Deleting a group share as user
+ Given As an "admin"
+ And user "user0" exists
+ And user "user1" exists
+ And group "group1" exists
+ And user "user1" belongs to group "group1"
+ And As an "user0"
+ And creating a share with
+ | path | welcome.txt |
+ | shareType | 1 |
+ | shareWith | group1 |
+ When As an "user1"
+ And Deleting last share
+ Then the OCS status code should be "404"
+ And the HTTP status code should be "200"
diff --git a/core/css/inputs.css b/core/css/inputs.css
index b58310a5c58..ebde986d584 100644
--- a/core/css/inputs.css
+++ b/core/css/inputs.css
@@ -310,3 +310,17 @@ input:disabled+label, input:disabled:hover+label, input:disabled:focus+label {
background-color: #00a2e9;
color: #bbb;
}
+
+@keyframes shake {
+ 0% { transform: translate(-5px, 0); }
+ 20% { transform: translate(5px, 0); }
+ 40% { transform: translate(-5px, 0); }
+ 60% { transform: translate(5px, 0); }
+ 80% { transform: translate(-5px, 0); }
+ 100% { transform: translate(5px, 0); }
+}
+.shake {
+ animation-name: shake;
+ animation-duration: .3s;
+ animation-timing-function: ease-out;
+}
diff --git a/core/js/apps.js b/core/js/apps.js
index d8f4bfdf1c5..a2d3460c907 100644
--- a/core/js/apps.js
+++ b/core/js/apps.js
@@ -27,9 +27,9 @@
*/
exports.Apps.showAppSidebar = function($el) {
var $appSidebar = $el || $('#app-sidebar');
- $appSidebar.removeClass('disappear');
- $('#app-content').addClass('with-app-sidebar').trigger(new $.Event('appresized'));
-
+ $appSidebar.removeClass('disappear')
+ .show('slide', { direction: 'right' }, 200);
+ $('#app-content').addClass('with-app-sidebar', 200).trigger(new $.Event('appresized'));
};
/**
@@ -40,8 +40,11 @@
*/
exports.Apps.hideAppSidebar = function($el) {
var $appSidebar = $el || $('#app-sidebar');
- $appSidebar.addClass('disappear');
- $('#app-content').removeClass('with-app-sidebar').trigger(new $.Event('appresized'));
+ $appSidebar.hide('slide', { direction: 'right' }, 100,
+ function() {
+ $appSidebar.addClass('disappear');
+ });
+ $('#app-content').removeClass('with-app-sidebar', 100).trigger(new $.Event('appresized'));
};
/**
diff --git a/core/js/tests/specs/appsSpec.js b/core/js/tests/specs/appsSpec.js
index 536d41c7f10..c3352e3e4a9 100644
--- a/core/js/tests/specs/appsSpec.js
+++ b/core/js/tests/specs/appsSpec.js
@@ -23,6 +23,10 @@ describe('Apps base tests', function() {
describe('Sidebar utility functions', function() {
beforeEach(function() {
$('#testArea').append('<div id="app-content">Content</div><div id="app-sidebar">The sidebar</div>');
+ jQuery.fx.off = true;
+ });
+ afterEach(function() {
+ jQuery.fx.off = false;
});
it('shows sidebar', function() {
var $el = $('#app-sidebar');
diff --git a/core/templates/login.php b/core/templates/login.php
index 95c5a423c3d..c5453c34497 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -38,7 +38,7 @@ script('core', [
<!-- the following div ensures that the spinner is always inside the #message div -->
<div style="clear: both;"></div>
</div>
- <p class="grouptop">
+ <p class="grouptop<?php if (!empty($_['invalidpassword'])) { ?> shake<?php } ?>">
<input type="text" name="user" id="user"
placeholder="<?php p($l->t('Username or email')); ?>"
value="<?php p($_['loginName']); ?>"
@@ -47,7 +47,7 @@ script('core', [
<label for="user" class="infield"><?php p($l->t('Username or email')); ?></label>
</p>
- <p class="groupbottom">
+ <p class="groupbottom<?php if (!empty($_['invalidpassword'])) { ?> shake<?php } ?>">
<input type="password" name="password" id="password" value=""
placeholder="<?php p($l->t('Password')); ?>"
<?php p($_['user_autofocus'] ? '' : 'autofocus'); ?>
diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
index 08af42b5216..3bfef2df025 100644
--- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
@@ -153,7 +153,7 @@ class SecurityMiddleware extends Middleware {
*/
if(!$this->request->passesCSRFCheck() && !(
$controller instanceof OCSController &&
- $this->request->getHeader('OCS_APIREQUEST') === true)) {
+ $this->request->getHeader('OCS-APIREQUEST') === 'true')) {
throw new CrossSiteRequestForgeryException();
}
}
diff --git a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
index a0af822d986..389a25a9bba 100644
--- a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
+++ b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
@@ -28,9 +28,8 @@ use OC\BackgroundJob\Job;
class DefaultTokenCleanupJob extends Job {
protected function run($argument) {
- /* @var $provider DefaultTokenProvider */
- // TODO: add OC\Authentication\Token\IProvider::invalidateOldTokens and query interface
- $provider = OC::$server->query('OC\Authentication\Token\DefaultTokenProvider');
+ /* @var $provider IProvider */
+ $provider = OC::$server->query('OC\Authentication\Token\IProvider');
$provider->invalidateOldTokens();
}
diff --git a/lib/private/Authentication/Token/IProvider.php b/lib/private/Authentication/Token/IProvider.php
index 4fb2830c3ac..65b515960ea 100644
--- a/lib/private/Authentication/Token/IProvider.php
+++ b/lib/private/Authentication/Token/IProvider.php
@@ -66,6 +66,11 @@ interface IProvider {
public function invalidateTokenById(IUser $user, $id);
/**
+ * Invalidate (delete) old session tokens
+ */
+ public function invalidateOldTokens();
+
+ /**
* Save the updated token
*
* @param IToken $token
diff --git a/settings/l10n/it.js b/settings/l10n/it.js
index 45961a769da..7448f92cbf1 100644
--- a/settings/l10n/it.js
+++ b/settings/l10n/it.js
@@ -313,6 +313,7 @@ OC.L10N.register(
"Default quota" : "Quota predefinita",
"Please enter storage quota (ex: \"512 MB\" or \"12 GB\")" : "Digita la quota di archiviazione (ad es.: \"512 MB\" or \"12 GB\")",
"Other" : "Altro",
+ "Group admin for" : "Gruppo di amministrazione per",
"Quota" : "Quote",
"Storage location" : "Posizione di archiviazione",
"User backend" : "Motore utente",
diff --git a/settings/l10n/it.json b/settings/l10n/it.json
index be2c253e14e..f23e662f72f 100644
--- a/settings/l10n/it.json
+++ b/settings/l10n/it.json
@@ -311,6 +311,7 @@
"Default quota" : "Quota predefinita",
"Please enter storage quota (ex: \"512 MB\" or \"12 GB\")" : "Digita la quota di archiviazione (ad es.: \"512 MB\" or \"12 GB\")",
"Other" : "Altro",
+ "Group admin for" : "Gruppo di amministrazione per",
"Quota" : "Quote",
"Storage location" : "Posizione di archiviazione",
"User backend" : "Motore utente",
diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
index 6f675932135..bfd810bc6b9 100644
--- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
@@ -383,7 +383,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
[$controller, true, true],
[$ocsController, false, true],
- [$ocsController, true, true],
+ [$ocsController, true, false],
];
}
@@ -396,6 +396,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
public function testCsrfOcsController(Controller $controller, $hasOcsApiHeader, $exception) {
$this->request
->method('getHeader')
+ ->with('OCS-APIREQUEST')
->willReturn($hasOcsApiHeader ? 'true' : null);
$this->request->expects($this->once())
->method('passesStrictCookieCheck')