13 Commits 0930e3ecee ... 8c04972498

Author SHA1 Message Date
  Roeland Jago Douma 8c04972498 Merge pull request #14737 from nextcloud/improve-starting-speed-of-acceptance-tests 5 years ago
  Morris Jobke 0e49302eea Merge pull request #14736 from nextcloud/fix/do_not_load_showpassword 5 years ago
  Morris Jobke 458359563b Merge pull request #14724 from nextcloud/enh/nonce_for_iframes 5 years ago
  Joas Schilling b357913587 Improve startup speed of acceptance tests 5 years ago
  Morris Jobke 4824d278f9 Merge pull request #14666 from nextcloud/design/settings-header 5 years ago
  Roeland Jago Douma 219fb1a855 Fix showpassword loads 5 years ago
  Morris Jobke 970d52fc29 Adjust acceptance tests 5 years ago
  Roeland Jago Douma c41687530d Merge pull request #14721 from nextcloud/fix/14639/trash_delete_perm 5 years ago
  Roeland Jago Douma 6c856ac588 Merge pull request #14719 from nextcloud/fix/14639/fix_preview_size_trash 5 years ago
  Jan-Christoph Borchardt 33bafb8e2b Don't show 'Personal' header in settings when Admin section is not there 5 years ago
  Roeland Jago Douma 4d8e1f6c67 CSP: set nonce for iframes 5 years ago
  Roeland Jago Douma 9dd7bc1919 Trashbin: Delete => Delete permanently 5 years ago
  Roeland Jago Douma 50a2ab8bc6 Use higher preview resolution in trashbin 5 years ago

File diff suppressed because it is too large
+ 0 - 0
apps/files_trashbin/js/files_trashbin.js


File diff suppressed because it is too large
+ 0 - 0
apps/files_trashbin/js/files_trashbin.js.map


+ 2 - 2
apps/files_trashbin/lib/Controller/PreviewController.php

@@ -85,8 +85,8 @@ class PreviewController extends Controller {
 	 */
 	public function getPreview(
 		int $fileId,
-		int $x = 44,
-		int $y = 44
+		int $x = 128,
+		int $y = 128
 	) {
 
 		if ($x === 0 || $y === 0) {

+ 2 - 2
apps/files_trashbin/src/app.js

@@ -47,7 +47,7 @@ OCA.Trashbin.App = {
 					},
 					{
 						name: 'delete',
-						displayName: t('files', 'Delete'),
+						displayName: t('files_trashbin', 'Delete permanently'),
 						iconClass: 'icon-delete',
 					}
 				],
@@ -95,7 +95,7 @@ OCA.Trashbin.App = {
 
 		fileActions.registerAction({
 			name: 'Delete',
-			displayName: t('files', 'Delete'),
+			displayName: t('files_trashbin', 'Delete permanently'),
 			mime: 'all',
 			permissions: OC.PERMISSION_READ,
 			iconClass: 'icon-delete',

+ 0 - 3
apps/user_ldap/templates/renewpassword.php

@@ -1,8 +1,5 @@
 <?php /** @var $l OC_L10N */ ?>
 <?php
-script('core', [
-	'jquery-showpassword',
-]);
 script('user_ldap', [
 	'renewPassword',
 ]);

+ 0 - 1
core/templates/installation.php

@@ -1,6 +1,5 @@
 <?php
 script('core', [
-	'jquery-showpassword',
 	'installation'
 ]);
 ?>

+ 5 - 1
lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php

@@ -468,7 +468,11 @@ class EmptyContentSecurityPolicy {
 		}
 
 		if(!empty($this->allowedFrameDomains)) {
-			$policy .= 'frame-src ' . implode(' ', $this->allowedFrameDomains);
+			$policy .= 'frame-src ';
+			if(is_string($this->useJsNonce)) {
+				$policy .= '\'nonce-' . base64_encode($this->useJsNonce) . '\' ';
+			}
+			$policy .= implode(' ', $this->allowedFrameDomains);
 			$policy .= ';';
 		}
 

+ 3 - 1
settings/templates/settings/frame.php

@@ -30,8 +30,10 @@ script('files', 'jquery.fileupload');
 
 <div id="app-navigation">
 	<ul>
-		<li class="app-navigation-caption"><?php p($l->t('Personal')); ?></li>
+		<?php if(!empty($_['forms']['admin'])) { ?>
+			<li class="app-navigation-caption"><?php p($l->t('Personal')); ?></li>
 		<?php
+		}
 		foreach($_['forms']['personal'] as $form) {
 			if (isset($form['anchor'])) {
 				$anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.PersonalSettings.index', ['section' => $form['anchor']]);

+ 0 - 1
settings/templates/settings/personal/security.php

@@ -28,7 +28,6 @@ script('settings', [
 
 if($_['passwordChangeSupported']) {
 	script('settings', 'security_password');
-	script('jquery-showpassword');
 }
 
 ?>

+ 2 - 1
tests/acceptance/features/access-levels.feature

@@ -12,7 +12,8 @@ Feature: access-levels
   Scenario: regular users cannot see admin-level items on the Settings page
     Given I am logged in
     When I visit the settings page
-    Then I see that the "Personal" settings panel is shown
+    Then I see that the "Personal info" entry in the settings panel is shown
+    And I see that the "Personal" settings panel is not shown
     And I see that the "Administration" settings panel is not shown
 
   Scenario: admin users can see admin-level items on the Settings page

+ 18 - 0
tests/acceptance/features/bootstrap/SettingsMenuContext.php

@@ -93,6 +93,15 @@ class SettingsMenuContext implements Context, ActorAwareInterface {
 		describedAs($itemText . " item in Settings panel");
 	}
 
+	/**
+	 * @param string $itemText
+	 * @return Locator
+	 */
+	private static function settingsPanelEntryFor($itemText) {
+		return Locator::forThe()->xpath("//div[@id = 'app-navigation']//ul//li[normalize-space() = '$itemText']")->
+		describedAs($itemText . " entry in Settings panel");
+	}
+
 	/**
 	 * @return array 
 	 */
@@ -188,6 +197,15 @@ class SettingsMenuContext implements Context, ActorAwareInterface {
 		);
 	}
 
+	/**
+	 * @Then I see that the :itemText entry in the settings panel is shown
+	 */
+	public function iSeeThatTheItemEntryInTheSettingsPanelIsShown($itemText) {
+		PHPUnit_Framework_Assert::assertTrue(
+			$this->actor->find(self::settingsPanelEntryFor($itemText), 10)->isVisible()
+		);
+	}
+
 	/**
 	 * @Then I see that the :itemText settings panel is not shown
 	 */

+ 12 - 1
tests/acceptance/run.sh

@@ -147,7 +147,18 @@ function prepareDocker() {
 	# "docker cp" does not take them into account (the extracted files are set
 	# to root).
 	echo "Copying local Git working directory of Nextcloud to the container"
-	tar --create --file="$NEXTCLOUD_LOCAL_TAR" --exclude=".git" --exclude="./build" --exclude="./config/config.php" --exclude="./data" --exclude="./data-autotest" --exclude="./tests" --exclude="./apps-extra" --exclude="apps-writable" --directory=../../ .
+	tar --create --file="$NEXTCLOUD_LOCAL_TAR" \
+		--exclude=".git" \
+		--exclude="./build" \
+		--exclude="./config/config.php" \
+		--exclude="./data" \
+		--exclude="./data-autotest" \
+		--exclude="./tests" \
+		--exclude="./apps-extra" \
+		--exclude="./apps-writable" \
+		--exclude="node_modules" \
+		--directory=../../ \
+		.
 	tar --append --file="$NEXTCLOUD_LOCAL_TAR" --directory=../../ tests/acceptance/
 
 	docker exec $NEXTCLOUD_LOCAL_CONTAINER mkdir /nextcloud

Some files were not shown because too many files changed in this diff