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

Migration script: execute only if there is a valid license #34

Closed
slauriere opened this issue Apr 11, 2019 · 0 comments

Comments

@slauriere
Copy link

commented Apr 11, 2019

This issue is about fixing an unexpected behaviour of the migration functionality raised by @mflorea in a comment on #18:

If you access the Diagram home page before requesting a license you see this:

Failed to execute the [include] macro. Cause: [Current user [xwiki:XWiki.Admin] doesn't have view rights on document [Document xwiki:Diagram.MigrationScriptMacros]]. Click on this message for details.

And below:

There is no valid license for Diagram Application (Pro). Please visit the Licenses section.

The user should see only the last message. The include of MigrationScriptMacros should be done only if there is a valid license (inside the else of the IF that shows the above message). We need a new issue for this.

@slauriere slauriere self-assigned this Apr 11, 2019

@slauriere slauriere changed the title Migration script: add preliminary license check Migration script: execute only if there is a valid license Apr 11, 2019

slauriere added a commit that referenced this issue Apr 11, 2019
#34: Migration script: execute only if there is a valid license
- Move the script call to a block executed only if there is a valid license
- Move the migration macro call to Diagram.WebHome so that Diagram.MigrationScriptMacros contains macro definition only
- Change slightly the formatting
slauriere added a commit that referenced this issue Apr 26, 2019
#34: Migration script: execute only if there is a valid license
- Remove call to probably obsolete macro 'includeMacros'
- Execute macro 'selectDiagramsRequiringMigration' from the MigrationScript
- In the migration utility page, display migration information only if a valid license is available
- Fix formatting issues
slauriere added a commit that referenced this issue Jul 26, 2019
slauriere added a commit that referenced this issue Jul 26, 2019
#34: Migration script: execute only if there is a valid license
- Include MigrationScriptMacros only if the license is valid
- Remove license check from MigrationScript and
MigrationScriptLiveTableResults since these pages cannot be accessed
directly without having a license

@mflorea mflorea added this to the 1.7 milestone Aug 13, 2019

slauriere added a commit that referenced this issue Aug 21, 2019
slauriere added a commit that referenced this issue Aug 21, 2019
#34: Migration script: execute only if there is a valid license
- Use label key for entire warning message
- Remove obsolete include
slauriere added a commit that referenced this issue Aug 21, 2019
#34: Migration script: execute only if there is a valid license (#35)
* #34: Migration script: execute only if there is a valid license
- Include MigrationScriptMacros only if the license is valid
- Move the script call to a block executed only if there is a valid license
- Move the migration macro call to Diagram.WebHome so that Diagram.MigrationScriptMacros contains macro definition only
- Remove call to obsolete macro 'includeMacros'
- Execute macro 'selectDiagramsRequiringMigration' from the MigrationScript
- Fix formatting issues
- Co-authored-by: Marius Dumitru Florea

@mflorea mflorea closed this Aug 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.