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

Krishantha Samaraweera updated CARBON-4855:
-------------------------------------------

    Attachment: error-message.png

> Display proper error message if login user doesn't have permission to 
> move/copy into a specific location.
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: CARBON-4855
>                 URL: https://wso2.org/jira/browse/CARBON-4855
>             Project: WSO2 Carbon
>          Issue Type: Bug
>          Components: Registry
>    Affects Versions: 2.0
>            Reporter: Krishantha Samaraweera
>            Assignee: Senaka Fernando
>             Fix For: 2.0.1, 2.1
>
>         Attachments: error-message.png
>
>
> How to reproduce:
> ============
> 1. Login as admin.
> 2. Add a new user (user1)
> 3. Add new role with all permissions (role1)
> 4. Now add a collection (col1)
> 5. Add read permission on col1 resource for role1
> 6. Now add a resource. (r1.txt)
> 7. Sign out and sign in as user1.
> 8. Now go to col1 and try to copy/move the collection to a anypath.
> page will get refreshed and resource doesn't get moved/copied to the 
> specified location. Since the user doesn't have permission to write to the 
> specified location, it is better if we can come up with a message saying the 
> exact reason. Otherwise user will get confused about the situation.
> Exception
> =========
> [2009-07-05 22:50:49,216] ERROR -  Failed to copy resource /AAA/echo.expected 
> to the path /AAA/test. Failed to copy resource /AAA/echo.expected to the path 
> /AAA/test. Failed to copy the resource: /AAA/echo.expected to Destination: 
> /AAA/test/echo.expected. Caused by: Failed to copy resource 
> /AAA/echo.expected to the path /AAA/test/echo.expected. All database 
> operations will be rolled back. Failed to add new resource. User test does 
> not have authorization to update the collection /AAA.
> org.wso2.carbon.registry.core.exceptions.RegistryException: Failed to copy 
> resource /AAA/echo.expected to the path /AAA/test. Failed to copy the 
> resource: /AAA/echo.expected to Destination: /AAA/test/echo.expected. Caused 
> by: Failed to copy resource /AAA/echo.expected to the path 
> /AAA/test/echo.expected. All database operations will be rolled back. Failed 
> to add new resource. User test does not have authorization to update the 
> collection /AAA.
>         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:619)
> Caused by: org.apache.axis2.AxisFault: Failed to copy the resource: 
> /AAA/echo.expected to Destination: /AAA/test/echo.expected. Caused by: Failed 
> to copy resource /AAA/echo.expected to the path /AAA/test/echo.expected. All 
> database operations will be rolled back. Failed to add new resource. User 
> test does not have authorization to update the collection /AAA.
>         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 mor

-- 
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