[ 
https://wso2.org/jira/browse/CARBON-4715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Krishantha Samaraweera closed CARBON-4715.
------------------------------------------


> Come up with proper error message when coping resources if the login user 
> don't have write permission to the destination directory.
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CARBON-4715
>                 URL: https://wso2.org/jira/browse/CARBON-4715
>             Project: WSO2 Carbon
>          Issue Type: Bug
>          Components: Registry
>    Affects Versions: 2.0 RC4
>            Reporter: Krishantha Samaraweera
>            Assignee: Senaka Fernando
>
> How to reproduce:
> ===========
> 1. Login as admin.
> 2. Add a new user (user1)
> 3. Add a new role with all permission (role1)
> 4. Assign user1 to role1
> 5. Then go to root level as admin.
> 6. Create a collection (testcollection)
> 7. Then add read and write permission to testcollection for role1.
> 8. Now login as user1
> 9. Go to testcollection
> 10. Add a resource.
> 11. Then copy that resource to new destination /TestNewCollection.
> Resource copying to new destination get fails since the user don't have write 
> permission to root level. so it is better if we can validate the user 
> permission level for the destination directory and come up with proper error 
> message.
> Exception.
> ========
> [2009-06-29 18:27:35,832] ERROR -  Failed to copy resource 
> /Test/09082008008.jpg to the path /Test2123. Failed to copy resource 
> /Test/09082008008.jpg to the path /Test2123. Failed to copy the resource: 
> /Test/09082008008.jpg to Destination: /Test2123/09082008008.jpg. Caused by: 
> Failed to copy resource /Test/09082008008.jpg to the path 
> /Test2123/09082008008.jpg. All database operations will be rolled back. null
> org.wso2.carbon.registry.core.exceptions.RegistryException: Failed to copy 
> resource /Test/09082008008.jpg to the path /Test2123. Failed to copy the 
> resource: /Test/09082008008.jpg to Destination: /Test2123/09082008008.jpg. 
> Caused by: Failed to copy resource /Test/09082008008.jpg to the path 
> /Test2123/09082008008.jpg. All database operations will be rolled back. null
>         at 
> org.wso2.carbon.registry.ui.resource.clients.ResourceServiceClient.copyResource(ResourceServiceClient.java:363)
>         at 
> org.wso2.carbon.registry.ui.resource.processors.CopyProcessor.process(CopyProcessor.java:48)
>         at 
> org.apache.jsp.resources.copy_005fajaxprocessor_jsp._jspService(copy_005fajaxprocessor_jsp.java:51)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:115)
>         at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:35)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at 
> org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:36)
>         at 
> org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
>         at 
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
>         at 
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at 
> org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:132)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
>         at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
>         at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
>         at 
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>         at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>         at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>         at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.axis2.AxisFault: Failed to copy the resource: 
> /Test/09082008008.jpg to Destination: /Test2123/09082008008.jpg. Caused by: 
> Failed to copy resource /Test/09082008008.jpg to the path 
> /Test2123/09082008008.jpg. All database operations will be rolled back. null
>         at 
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:518)
>         at 
> org.apache.axis2.description.RobustOutOnlyAxisOperation$RobustOutOnlyOperationClient.handleResponse(RobustOutOnlyAxisOperation.java:91)
>         at 
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
>         at 
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>         at 
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>         at 
> org.wso2.carbon.registry.ui.resources.ResourceAdminServiceStub.copyResource(ResourceAdminServiceStub.java:6959)
>         at 
> org.wso2.carbon.registry.ui.resource.clients.ResourceServiceClient.copyResource(ResourceServiceClient.java:358)
>         ... 32 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
Carbon-dev mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to