Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
6912364e
Verified
Commit
6912364e
authored
5 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
BUG: logout did not work
parent
ddd2d8dc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/caosdb/connection/authentication/interface.py
+3
-3
3 additions, 3 deletions
src/caosdb/connection/authentication/interface.py
src/caosdb/utils/checkFileSystemConsistency.py
+6
-0
6 additions, 0 deletions
src/caosdb/utils/checkFileSystemConsistency.py
with
9 additions
and
3 deletions
src/caosdb/connection/authentication/interface.py
+
3
−
3
View file @
6912364e
...
@@ -176,7 +176,7 @@ class CredentialsAuthenticator(AbstractAuthenticator):
...
@@ -176,7 +176,7 @@ class CredentialsAuthenticator(AbstractAuthenticator):
super
(
CredentialsAuthenticator
,
self
).
__init__
()
super
(
CredentialsAuthenticator
,
self
).
__init__
()
self
.
_credentials_provider
=
credentials_provider
self
.
_credentials_provider
=
credentials_provider
self
.
_connection
=
None
self
.
_connection
=
None
self
.
_
auth_token
=
None
self
.
auth_token
=
None
def
login
(
self
):
def
login
(
self
):
self
.
_login
()
self
.
_login
()
...
@@ -186,9 +186,9 @@ class CredentialsAuthenticator(AbstractAuthenticator):
...
@@ -186,9 +186,9 @@ class CredentialsAuthenticator(AbstractAuthenticator):
def
_logout
(
self
):
def
_logout
(
self
):
_LOGGER
.
debug
(
"
[LOGOUT]
"
)
_LOGGER
.
debug
(
"
[LOGOUT]
"
)
if
self
.
_
auth_token
is
not
None
:
if
self
.
auth_token
is
not
None
:
self
.
_connection
.
request
(
method
=
"
DELETE
"
,
path
=
"
logout
"
)
self
.
_connection
.
request
(
method
=
"
DELETE
"
,
path
=
"
logout
"
)
self
.
_
auth_token
=
None
self
.
auth_token
=
None
def
_login
(
self
):
def
_login
(
self
):
username
=
self
.
_credentials_provider
.
username
username
=
self
.
_credentials_provider
.
username
...
...
This diff is collapsed.
Click to expand it.
src/caosdb/utils/checkFileSystemConsistency.py
+
6
−
0
View file @
6912364e
...
@@ -53,6 +53,12 @@ class CLIError(Exception):
...
@@ -53,6 +53,12 @@ class CLIError(Exception):
def
runCheck
(
timeout
,
location
):
def
runCheck
(
timeout
,
location
):
"""
Request the caosdb server to check the file system for consistency.
location == None means that the whole file system is being checked.
Otherwise only a the directory tree under location is being checked.
"""
if
(
timeout
is
not
None
):
if
(
timeout
is
not
None
):
db
.
get_config
().
set
(
"
Connection
"
,
"
timeout
"
,
str
(
100
+
int
(
timeout
)))
db
.
get_config
().
set
(
"
Connection
"
,
"
timeout
"
,
str
(
100
+
int
(
timeout
)))
files
=
db
.
Container
().
retrieve
(
files
=
db
.
Container
().
retrieve
(
...
...
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