sharing/group: rename auth_type -> from_auth
This commit is contained in:
@@ -1026,7 +1026,7 @@ Available types are:
|
|||||||
* `ldap` _(>= 3.3.0)_
|
* `ldap` _(>= 3.3.0)_
|
||||||
Use a LDAP or AD server to authenticate users by relaying credentials from clients and handle results.
|
Use a LDAP or AD server to authenticate users by relaying credentials from clients and handle results.
|
||||||
|
|
||||||
User groups are supported. Requires group/type=`auth_type` _(>= 3.8.0)_.
|
User groups are supported. Requires group/type=`from_auth` _(>= 3.8.0)_.
|
||||||
|
|
||||||
* `dovecot` _(>= 3.3.1)_
|
* `dovecot` _(>= 3.3.1)_
|
||||||
Use a Dovecot server to authenticate users by relaying credentials from clients and handle results.
|
Use a Dovecot server to authenticate users by relaying credentials from clients and handle results.
|
||||||
@@ -1265,7 +1265,7 @@ They also give you access to the group calendars, if those exist.
|
|||||||
|
|
||||||
Default: (unset)
|
Default: (unset)
|
||||||
|
|
||||||
Requires group lookup type set to `auth_type` _(>= 3.8.0)_
|
Requires group lookup type set to `from_auth` _(>= 3.8.0)_
|
||||||
|
|
||||||
##### ldap_group_members_attribute
|
##### ldap_group_members_attribute
|
||||||
|
|
||||||
@@ -1513,7 +1513,7 @@ Available types are:
|
|||||||
* `none`
|
* `none`
|
||||||
No groups lookup at all
|
No groups lookup at all
|
||||||
|
|
||||||
* `auth_type`
|
* `from_auth`
|
||||||
Group lookup by authentication type (if supported)
|
Group lookup by authentication type (if supported)
|
||||||
|
|
||||||
* `htgroup`
|
* `htgroup`
|
||||||
|
|||||||
2
config
2
config
@@ -214,7 +214,7 @@
|
|||||||
[group]
|
[group]
|
||||||
|
|
||||||
# Group lookup method
|
# Group lookup method
|
||||||
# Value: none | auth_type | htgroup
|
# Value: none | from_auth | htgroup
|
||||||
type = none
|
type = none
|
||||||
|
|
||||||
# Htgroup filename
|
# Htgroup filename
|
||||||
|
|||||||
@@ -601,7 +601,7 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
|
|||||||
group_type = self.configuration.get("group", "type")
|
group_type = self.configuration.get("group", "type")
|
||||||
if group_type in ["htgroup"]:
|
if group_type in ["htgroup"]:
|
||||||
self._rights._user_groups = self._group.groups(login) if login else set([])
|
self._rights._user_groups = self._group.groups(login) if login else set([])
|
||||||
elif group_type in ["auth_type"]:
|
elif group_type in ["from_auth"]:
|
||||||
auth_type = self.configuration.get("auth", "type")
|
auth_type = self.configuration.get("auth", "type")
|
||||||
if auth_type in ["ldap", "pam"]:
|
if auth_type in ["ldap", "pam"]:
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ from radicale import config, utils
|
|||||||
from radicale.log import logger
|
from radicale.log import logger
|
||||||
|
|
||||||
INTERNAL_TYPES: Sequence[str] = ("none",
|
INTERNAL_TYPES: Sequence[str] = ("none",
|
||||||
"auth_type",
|
"from_auth",
|
||||||
"htgroup",
|
"htgroup",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ class TestBaseGroupRequests(BaseTest):
|
|||||||
or "Group memberships (htgroup) for user 'tmp': {'group1', 'group2'}" in log
|
or "Group memberships (htgroup) for user 'tmp': {'group1', 'group2'}" in log
|
||||||
]) == 0
|
]) == 0
|
||||||
|
|
||||||
def test_incompatible_group_auth_type(self) -> None:
|
def test_incompatible_group_from_auth(self) -> None:
|
||||||
for auth_type in ["dovecot", "imap", "remote_user", "http_remote_user", "htpasswd", "oauth2"]:
|
for auth_type in ["dovecot", "imap", "remote_user", "http_remote_user", "htpasswd", "oauth2"]:
|
||||||
logging.info("\n*** test: auth_type=%r, group_type=%r", "dovecot", auth_type)
|
logging.info("\n*** test: auth_type=%r, group_type=%r", "dovecot", auth_type)
|
||||||
try:
|
try:
|
||||||
@@ -116,7 +116,7 @@ class TestBaseGroupRequests(BaseTest):
|
|||||||
"type": auth_type,
|
"type": auth_type,
|
||||||
"oauth2_token": "dummy",
|
"oauth2_token": "dummy",
|
||||||
},
|
},
|
||||||
"group": {"type": "auth_type"}
|
"group": {"type": "from_auth"}
|
||||||
})
|
})
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
pass
|
pass
|
||||||
@@ -130,7 +130,7 @@ class TestBaseGroupRequests(BaseTest):
|
|||||||
{"auth": {
|
{"auth": {
|
||||||
"type": auth_type,
|
"type": auth_type,
|
||||||
},
|
},
|
||||||
"group": {"type": "auth_type"}
|
"group": {"type": "from_auth"}
|
||||||
})
|
})
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
raise
|
raise
|
||||||
|
|||||||
Reference in New Issue
Block a user