Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
863a324e
Commit
863a324e
authored
9 years ago
by
jakubs
Browse files
Options
Downloads
Patches
Plain Diff
fix a bug when user can't use upload app, becuase his name contains a dash character
SVN: 35652
parent
4758c555
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plasmid/source/core-plugins/eln-lims/1/dss/reporting-plugins/newbrowserapi/script.py
+7
-1
7 additions, 1 deletion
.../eln-lims/1/dss/reporting-plugins/newbrowserapi/script.py
with
7 additions
and
1 deletion
plasmid/source/core-plugins/eln-lims/1/dss/reporting-plugins/newbrowserapi/script.py
+
7
−
1
View file @
863a324e
...
...
@@ -37,6 +37,7 @@ from ch.ethz.ssdm.eln import PlasmapperConnector
import
time
import
subprocess
import
os.path
import
re
from
java.io
import
StringWriter
from
org.htmlcleaner
import
HtmlCleaner
...
...
@@ -96,6 +97,11 @@ def getSampleByIdentifierForUpdate(tr, identifier):
else
:
raise
UserFailureException
(
identifier
+
"
Not found by search service.
"
);
def
username
(
sessiontoken
):
m
=
re
.
compile
(
'
(.*)-[^-]*
'
).
match
(
sessiontoken
)
if
m
:
return
m
.
group
(
1
)
def
process
(
tr
,
parameters
,
tableBuilder
):
method
=
parameters
.
get
(
"
method
"
);
...
...
@@ -103,7 +109,7 @@ def process(tr, parameters, tableBuilder):
result
=
None
;
# Obtain the user using the dropbox
sessionToken
=
parameters
.
get
(
"
sessionToken
"
);
#String
sessionId
=
sessionToken
.
split
(
"
-
"
)[
0
]
;
#String
sessionId
=
username
(
sessionToken
)
;
#String
if
sessionId
==
userId
:
tr
.
setUserId
(
userId
);
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment