Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

password_policy 2.1.2 #291

Closed
31 of 32 tasks
HanaGemela opened this issue Mar 16, 2020 · 9 comments · Fixed by #296
Closed
31 of 32 tasks

password_policy 2.1.2 #291

HanaGemela opened this issue Mar 16, 2020 · 9 comments · Fixed by #296
Assignees
Milestone

Comments

@HanaGemela
Copy link
Contributor

HanaGemela commented Mar 16, 2020

Reason

QA

Documentation

  • Changes in the docs needed? If so create issue in owncloud/docs.

Marketing

  • Ping @owncloud/marketing
  • Ping pmaier to check info.xml description and screenshot

Build

All actions to be done on the release branch from here:

  • Bump version in info.xml (no version suffix)
  • Check php version dependency in info.xml
  • Check minimum ownCloud version dependency in info.xml
  • Change CHANGELOG.md 'Unreleased' to '$version' (today's date)

Beta/RC

  • Create github tag for v${version}RC1 on release branch
  • Build and sign RC tarball from github tag v${version}RC1 (see
    handbook for how to build)
  • Upload as Github release using changelog entries
  • Test and document in testplan => Final "Go" from QA (set 'QA-ready' label) => else do another RC after fixing issues in the "release-$version" branch

Final

Publishing

  • Upload tarball to marketplace (see handbook for details)
  • Publish tarball for customers (see handbook for details) - https://customer.owncloud.com and https://portal.owncloud.com
  • Send mail to release-coordination with link to this ticket and to the changelog
  • Copy email to rocket chat #updates channel

Post-release

  • Rename QA milestone to $version
  • Add a new 'Unreleased' section in CHANGELOG.md
  • Create PR to merge changes back to the master branch with
    description "Closes #XYZ" with the release ticket number
  • Close the milestone
  • Ensure release template is up to date
@micbar
Copy link
Contributor

micbar commented Mar 16, 2020

@karakayasemi @pako81
I assigned @VicDeo for the DEV tasks,

please coordinate and share existing code / concepts

@pako81
Copy link

pako81 commented Mar 16, 2020

@VicDeo this is what I had in mind and seems to work locally. It requires changes in both core and password_policy:

  • password_policy:
--- /Users/pasqualetripodi/Downloads/password_policy/lib/HooksHandler.php	2020-02-04 14:19:55.000000000 +0100
+++ /Users/pasqualetripodi/Sites/owncloud1040/apps/password_policy/lib/HooksHandler.php	2020-03-10 16:30:13.000000000 +0100
@@ -190,13 +190,13 @@
 			$date->setTime(0, 0, 0);
 			$date->add(new \DateInterval('P'.$days.'D'));
 
-			if ($params['expirationDate'] === null) {
+			if ($params['expirationDate'] === null && $params['shareType'] === '\OCP\Share::SHARE_TYPE_LINK') {
 				$params['accepted'] = false;
 				$params['message'] = (string) $this->l10n->t('An expiration date is required.');
 			}
 
 			// $date is the max expiration date
-			if ($date < $params['expirationDate']) {
+			if ($date < $params['expirationDate'] && $params['shareType'] === '\OCP\Share::SHARE_TYPE_LINK') {
 				$params['accepted'] = false;
 				$params['message'] = (string) $this->l10n->n('The expiration date cannot exceed %n day.', 'The expiration date cannot exceed %n days.', $days);
 			}
  • core:
--- /Users/pasqualetripodi/Downloads/owncloud/lib/private/Share20/Manager.php	2020-02-27 15:31:05.000000000 +0100
+++ /Users/pasqualetripodi/Sites/owncloud1040/lib/private/Share20/Manager.php	2020-03-10 16:29:43.000000000 +0100
@@ -469,6 +469,7 @@
 			'accepted' => &$accepted,
 			'message' => &$message,
 			'passwordSet' => $share->getPassword() !== null,
+			'shareType' => $share->getShareType(),
 		]);
 
 		if (!$accepted) {

@karakayasemi
Copy link
Contributor

@pako81's solution seems okay and safe to me. As far as I see, there are no other usages of the change suggested hook in the code-base out of the password_policy app. But, the hook will be backward compatible with @pako81's solution anyway.

Also, since we have now user share expiration date, we may extend password_policy app features with user share expiration date checks without touching core in the future.

@VicDeo
Copy link
Member

VicDeo commented Mar 16, 2020

What is behavior we are fixing with the changeset above?

@pako81
Copy link

pako81 commented Mar 16, 2020

@VicDeo see #287

@phil-davis
Copy link
Contributor

PR #293 fixes #287 and is merged.

@HanaGemela IMO we can start the release process.

(Isssue #286 is a suggestion for improving UI workflow - IMO not to be done for this release)

@HanaGemela HanaGemela changed the title password_policy - new release password_policy 2.1.2 Mar 20, 2020
@HanaGemela HanaGemela added this to the QA milestone Mar 20, 2020
@HanaGemela
Copy link
Contributor Author

@HanaGemela
Copy link
Contributor Author

@davitol priority has been increased to P2

@davitol
Copy link
Contributor

davitol commented Mar 30, 2020

@davitol RC1 ready for testing https://github.com/owncloud/password_policy/releases/tag/v2.1.2RC1

Tarball is QA-ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants