Skip to content

Commit f73555b

Browse files
committed
feat!: run all the authenticators before checking the access
1 parent 3b5785e commit f73555b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

ckanext/vip_portal/plugin.py

+14
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ def identify(self):
2323
if config.free_anonymous_access():
2424
return
2525

26+
authenticators = p.PluginImplementations(p.IAuthenticator)
27+
if authenticators:
28+
for item in authenticators:
29+
if item is self:
30+
continue
31+
response = item.identify()
32+
if response:
33+
return response
34+
try:
35+
if tk.g.user:
36+
break
37+
except AttributeError:
38+
continue
39+
2640
# try default identifier if no extensions have identified user up until
2741
# now
2842
if not getattr(tk.g, "user", None):

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = ckanext-vip-portal
3-
version = 0.0.6
3+
version = 0.1.0
44
description =
55
long_description = file: README.md
66
long_description_content_type = text/markdown

0 commit comments

Comments
 (0)