Project

Profile

Help

Story #7232

Updated by bmbouter 4 months ago

## Background

Users need to:

* List all groups
* View a single group
* View Membership info
* View Permission info

## URL

* `GET /pulp/api/v3/groups/` - the list view
* `GET /pulp/api/v3/groups/:uuid/` - the detail view
* `GET /pulp/api/v3/groups/:uuid/permissions/` - list all permissions view
* `GET /pulp/api/v3/groups/:uuid/users/` - list all users in the group view

## The Model

The model is defined by Django: https://github.com/django/django/blob/7af8f4127397279d19ef7c7899e93018274e2f9b/django/contrib/auth/models.py#L92-L126

## `/pulp/api/v3/groups/:uuid/` Serializer fields

* name - https://github.com/django/django/blob/7af8f4127397279d19ef7c7899e93018274e2f9b/django/contrib/auth/models.py#L109

## `/pulp/api/v3/groups/:uuid/permissions/` Serializer

Each permission entry for model-level permission should have:

```
{
"name": "file.view_fileremote",
"obj": None
}
```

Each permission entry for the object-level permission should have:
```
{
"name": "file.view_fileremote",
"obj": "/pulp/api/v3/remotes/file/file/<UUID_HERE/"
}
```

## `/pulp/api/v3/groups/:uuid/users/` Serializer

A list of entries like:

```
{
"username": "foo",
"pulp_href": "/pulp/api/v3/users/<UUID_HERE>/"
}
```

Back