Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/weko-accounts/weko_accounts/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@
WEKO_ACCOUNTS_GAKUNIN_GROUP_PATTERN_DICT = {
"prefix":"jc",
"sysadm_group":"jc_roles_sysadm",
"role_keyword":"roles",
"role_keyword":"ro",
"role_mapping":{
"repoadm":"Repository Administrator",
"comadm":"Community Administrator",
"contributor":"Contributor",
"radm":"Repository Administrator",
"cadm":"Community Administrator",
"cont":"Contributor",
}
}
"""Patterns for Gakunin group names."""
Expand Down
4 changes: 2 additions & 2 deletions modules/weko-index-tree/weko_index_tree/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,13 +859,13 @@ def filter_roles(cls, roles):
)

gakunin_map_prefix = gakunin_map_pattern.get("prefix", "jc")
role_keyword = gakunin_map_pattern.get("role_keyword", "roles")
role_keyword = gakunin_map_pattern.get("role_keyword", "ro")

for role in roles:
role_name = role.get("name", "")
role_info = {"id": role.get("id"), "name": role_name}
if role_name.startswith(gakunin_map_prefix):
if role_keyword in role_name:
if f"_{role_keyword}_" in role_name:
# gakunin_map group role
gakunin_map_role_groups.append(role)
else:
Expand Down
Loading