Skip to content
Snippets Groups Projects
Verified Commit 943593f6 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

FIX: scripting purpose

parent 218584dc
No related branches found
No related tags found
No related merge requests found
......@@ -213,7 +213,7 @@ public class ScriptingResource extends AbstractCaosDBServerResource {
* the call is not configured to be called by everyone, a SessionToken is returned instead.
*/
public Object generateAuthToken(String call) {
String purpose = ScriptingPermissions.PERMISSION_EXECUTION(call);
String purpose = "SCRIPTING:EXECUTE:" + call;
Object authtoken = OneTimeAuthenticationToken.generateForPurpose(purpose, getUser());
if (authtoken != null || isAnonymous()) {
return authtoken;
......
......@@ -3,7 +3,7 @@ package caosdb.server.scripting;
public class ScriptingPermissions {
public static final String PERMISSION_EXECUTION(final String call) {
StringBuilder ret = new StringBuilder(10 + call.length());
StringBuilder ret = new StringBuilder(18 + call.length());
ret.append("SCRIPTING:EXECUTE:");
ret.append(call.replace("/", ":"));
return ret.toString();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment