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

Fix license error message in case of license doesn't expire #1446

Merged
merged 2 commits into from
Dec 29, 2016

Conversation

dmytro-ndp
Copy link
Contributor

@dmytro-ndp dmytro-ndp commented Dec 28, 2016

Signed-off-by: Dmytro Nochevnov dnochevnov@codenvy.com

What does this PR do?

Fix error message on start of workspace by non-admin user in case of number of registered users more than license allows, but license hasn't expired yet.

Previous misleading message:

The Codenvy license is expired - you can access the user dashboard but not the IDE.

Fixed message

The Codenvy license has reached its user limit - you can access the user dashboard but not the IDE.

@tolusha: please, review this request.


This change is Reviewable

try {
// when license exists
SystemLicense license = load(); // check if license exists
if (license.isExpiredCompletely()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason to name method isExpiredCompletely? How does it differ from isExpired ?
Consider split methods into two separated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isExpiredCompletely = isExpired + additional time for renew license.

Dmytro Nochevnov added 2 commits December 29, 2016 11:12
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
…rRenewExpired() methods

Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
@dmytro-ndp
Copy link
Contributor Author

@tolusha: I have splitted SystemLicense.isExpiredCompletely() on isExpired() and isTimeForRenewExpired() methods, as you suggested.
Thank you for advice.
Please, review fixup.

@tolusha
Copy link
Contributor

tolusha commented Dec 29, 2016

Cool. thx.

@dmytro-ndp dmytro-ndp merged commit 7b51ace into master Dec 29, 2016
@dmytro-ndp dmytro-ndp deleted the license_fix branch December 29, 2016 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants