You've already forked snikket-web-portal
Fix login for restricted users
Previously this led to an OAuth grant with an empty scope, which could not be used for anything.
This commit is contained in:
@@ -29,6 +29,7 @@ from . import xmpputil
|
|||||||
from .xmpputil import split_jid
|
from .xmpputil import split_jid
|
||||||
|
|
||||||
|
|
||||||
|
SCOPE_RESTRICTED = "prosody:restricted"
|
||||||
SCOPE_DEFAULT = "prosody:registered"
|
SCOPE_DEFAULT = "prosody:registered"
|
||||||
SCOPE_ADMIN = "prosody:admin"
|
SCOPE_ADMIN = "prosody:admin"
|
||||||
|
|
||||||
@@ -399,7 +400,7 @@ class ProsodyClient:
|
|||||||
request.add_field("password", password)
|
request.add_field("password", password)
|
||||||
request.add_field(
|
request.add_field(
|
||||||
"scope",
|
"scope",
|
||||||
" ".join([SCOPE_DEFAULT, SCOPE_ADMIN])
|
" ".join([SCOPE_RESTRICTED, SCOPE_DEFAULT, SCOPE_ADMIN])
|
||||||
)
|
)
|
||||||
|
|
||||||
self.logger.debug("sending OAuth2 request (payload omitted)")
|
self.logger.debug("sending OAuth2 request (payload omitted)")
|
||||||
|
|||||||
Reference in New Issue
Block a user