| Summary: | Non-admin project maintainer failed to push source documents with maven client | ||
|---|---|---|---|
| Product: | [Retired] Zanata | Reporter: | Ding-Yi Chen <dchen> |
| Component: | Authentication-Fedora | Assignee: | Carlos Munoz <camunoz> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Zanata-QA Mailling List <zanata-qa> |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.1 | CC: | camunoz, sflaniga, zanata-bugs, zanata-qa |
| Target Milestone: | --- | ||
| Target Release: | 3.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 3.1.3-SNAPSHOT (20131022-1725) | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-11-27 03:24:52 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Also note that upload source documents with Web UI works, but there are large projects which consist 1000+ source documents which are not practical to upload one by one manually. This is a problem with our Asynchronous tasks not inheriting the whole context from the caller. I will add a mechanism to copy some of that context over, but we will potentially encounter this problem in the future with other components that might be expected to be present in the context. VERIFIED with Zanata version 3.1.3-SNAPSHOT (20131022-1725) Note that this can still reproduced in 3.2-SNAPSHOT (20131022-1356). The fix has now been merged to integration/master. VERIFIED with Zanata version 3.2-SNAPSHOT (20131023-1236) Closing VERIFIED bugs for Zanata versions <= 3.1. Closing VERIFIED bugs for Zanata versions <= 3.1. Closing VERIFIED bugs for Zanata versions <= 3.1. Closing VERIFIED bugs for Zanata versions <= 3.1. Closing VERIFIED bugs for Zanata versions <= 3.1. Closing VERIFIED bugs for Zanata versions <= 3.1. |
Description of problem: When using maven client pushing source documents as project maintainer without admin role, the project failed with error messages like following: Authorization check failed for permission[HProjectIteration(super=SlugEntityBase(super=HProjectIteration@aefc4c0a[id=39,versionNum=0], slug=6.5), project=HProject(super=SlugEntityBase(super=HProject@e64bfcd4[id=21,versionNum=2], slug=rhel-installation-guide), name=RHEL Installation Guide)),import-template]] Version-Release number of selected component (if applicable): Zanata version 3.1.2-SNAPSHOT (20131021-1234) How reproducible: Always Steps to Reproduce: 1. Create a project and version on Zanata Server. 2. mvn -e zanata:push -Dzanata.url=<ZantaURL> -Dzanata.username=<USERNAME> -Dzanata.key=<APIKEY> Actual results: "Authorization check failed" shown at client error message. Expected results: Push successfully. Additional info: Server log shows nothing other than: Acount <USERNAME> authenticated Client error messages: [ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:3.1.2:push (default-cli) on project standalone-pom: Zanata mojo exception: Operation failed. [ERROR] [ERROR] To retry from the last document, please set the following option(s): [ERROR] [ERROR] -Dzanata.fromDoc="Account_Configuration_common-figure-1" [ERROR] [ERROR] . Failed while pushing document: [Authorization check failed for permission[HProjectIteration(super=SlugEntityBase(super=HProjectIteration@aefc4c0a[id=39,versionNum=0], slug=6.5), project=HProject(super=SlugEntityBase(super=HProject@e64bfcd4[id=21,versionNum=2], slug=rhel-installation-guide), name=RHEL Installation Guide)),import-template]] [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:3.1.2:push (default-cli) on project standalone-pom: Zanata mojo exception at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Zanata mojo exception at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:141) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: java.lang.RuntimeException: Operation failed. To retry from the last document, please set the following option(s): -Dzanata.fromDoc="Account_Configuration_common-figure-1" . at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:459) at org.zanata.client.commands.push.PushCommand.run(PushCommand.java:207) at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:166) at org.zanata.maven.AbstractPushPullMojo.runCommand(AbstractPushPullMojo.java:41) at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:137) ... 21 more Caused by: java.lang.RuntimeException: Failed while pushing document: [Authorization check failed for permission[HProjectIteration(super=SlugEntityBase(super=HProjectIteration@aefc4c0a[id=39,versionNum=0], slug=6.5), project=HProject(super=SlugEntityBase(super=HProject@e64bfcd4[id=21,versionNum=2], slug=rhel-installation-guide), name=RHEL Installation Guide)),import-template]] at org.zanata.client.commands.push.PushCommand.pushSrcDocToServer(PushCommand.java:539) at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:422) ... 25 more