How to do runas admin in webscript
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2014 07:50 AM
I try to run my webscript as admin permissions like is described in http://docs.alfresco.com/3.4/references/api-ws-runas.html, but my alfresco version is 3.0 Labs and I can't do that.
My web script run a script placed in "Data Dictionary/Scripts" that remove one file where the user haven't got the 'remove' permission.
My "doAct.get.desc.xml" is:
If I refresh my webscript I get the next error message:
And If I run the web script I get the next error:
This happens if my webscript is in "Data Dictionary/Web Scripts" and in "Data Dictionary/Web Scripts Extensions".
How I can solve it?? Where is the secure store??
thanks in advance
My web script run a script placed in "Data Dictionary/Scripts" that remove one file where the user haven't got the 'remove' permission.
My "doAct.get.desc.xml" is:
If I refresh my webscript I get the next error message:
Alfresco Web Scripts MaintenanceMaintenance CompletedReset Web Scripts Registry; registered 284 Web Scripts. Previously, there were 285.Warning: found 1 broken Web Scripts. Previously, there were 0.Broken Web ScriptsFailed to parse web script description document doAct/doAct.get.desc.xml ; runas user declared for script in insecure store (workspace://SpacesStore/app:company_home/app:dictionary/cm:extensionwebscripts/doAct/doAct.get.desc.xml)List Web Scripts
And If I run the web script I get the next error:
Web Script Status 404 - Not FoundThe Web Script /alfresco/service/doAct has responded with a status of 404 - Not Found.404 Description: Requested resource is not available. Message: Script url /doAct does not map to a Web Script. Exception: org.alfresco.web.scripts.WebScriptException - Script url /doAct does not map to a Web Script. org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:106) org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) java.lang.Thread.run(Thread.java:662) Server: Alfresco Labs v3.0.0 (Stable 1526) schema 1,002Time: Sep 22, 2014 1:34:43 PM
This happens if my webscript is in "Data Dictionary/Web Scripts" and in "Data Dictionary/Web Scripts Extensions".
How I can solve it?? Where is the secure store??
thanks in advance
Labels:
- Labels:
-
Archive
13 REPLIES 13
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2014 11:32 AM
Sorry, but I can't try this option because I have all the system with this version and I must to keep it.
By the way. With my alfresco version is posible to call the alfresco "run Action/Script" within this webscript without using the import tag??
(such as the steps in the interface: go to folder detail, select run action, select run script, select the script file, click next and finish to run the action)
Thanks in advance
By the way. With my alfresco version is posible to call the alfresco "run Action/Script" within this webscript without using the import tag??
(such as the steps in the interface: go to folder detail, select run action, select run script, select the script file, click next and finish to run the action)
Thanks in advance
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2014 02:07 AM
I'm sorry It is not clear to me what you mean by <strong>By the way. With my alfresco version is posible to call the alfresco "run Action/Script" within this webscript without using the import tag??</strong>.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2014 02:56 AM
I'm sorry, let me explain better.
In alfresco, in every space we have the action "Show details", which open a new page with space detail. Then in the action panel I have the option "Run action". Selecting it we can choose the option "run script action" to execute a javascript placed in alfresco repository.
And my idea is to avoid import the script within the webscript and change it to some call (if exits) to do automatically the steps explained before.
Is it clearer now?
thanks for your time.
In alfresco, in every space we have the action "Show details", which open a new page with space detail. Then in the action panel I have the option "Run action". Selecting it we can choose the option "run script action" to execute a javascript placed in alfresco repository.
And my idea is to avoid import the script within the webscript and change it to some call (if exits) to do automatically the steps explained before.
Is it clearer now?
thanks for your time.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2014 11:20 PM
I'm not ver clear about your requirement.but yes you can use rules to execute a javascript action when some events happen.
