Project

Profile

Help

Story #7231

closed

As a user, I can Read Users, group membership, and their permissions via an API

Added by bmbouter over 4 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 79
Quarter:

Description

Background

Users need to:

  • List all users
  • View a single user
  • View group membership for that user
  • View user and group permissions for that user

URL

  • GET /pulp/api/v3/users/ - the list view
  • GET /pulp/api/v3/users/:uuid/ - the detail view
  • GET /pulp/api/v3/users/:uuid/permissions/ - list all permissions view

The model

This is defined by Django: https://github.com/django/django/blob/7af8f4127397279d19ef7c7899e93018274e2f9b/django/contrib/auth/models.py#L321-L356

/pulp/api/v3/users/:uuid/ Serializer

A list of entries like:

{
    "group_name": "foo",
    "pulp_href": "/pulp/api/v3/groups/<UUID_HERE>/"
}

/pulp/api/v3/users/: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/"
}

Also available in: Atom PDF