Skip to content

Commit

Permalink
groups: updates mapping to contain description
Browse files Browse the repository at this point in the history
  • Loading branch information
jrcastro2 authored and kpsherva committed Jun 15, 2023
1 parent 80a217c commit 0b7bf7e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
10 changes: 7 additions & 3 deletions invenio_users_resources/records/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ def parse_user_data(user):
def parse_role_data(role):
"""Parse the role's information into a dictionary."""
data = {
"id": role.name, # due to flask security exposing user id
"name": role.description,
"is_managed": True, # TODO
"id": role.id,
"name": role.name,
"description": role.description,
"is_managed": role.is_managed,
}
return data

Expand Down Expand Up @@ -189,6 +190,9 @@ class GroupAggregate(Record):
name = DictField("name")
"""The group's name."""

description = DictField("description")
"""The group's name."""

is_managed = DictField("is_managed")
"""If the group is managed manually."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
}
}
},
"description": {
"type": "text"
},
"provider": {
"type": "text"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
}
}
},
"description": {
"type": "text"
},
"provider": {
"type": "text"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
}
}
},
"description": {
"type": "text"
},
"provider": {
"type": "text"
},
Expand Down

0 comments on commit 0b7bf7e

Please sign in to comment.