Project

Profile

Help

Story #7231

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

Added by bmbouter 3 months ago. Updated 2 months 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/"
}

Associated revisions

Revision 6e6f599f View on GitHub
Added by Fabricio Aguiar 3 months ago

Read API for Users, Group membership, and Permissions

https://pulp.plan.io/issues/7231 closes #7231

History

#1 Updated by bmbouter 3 months ago

  • Subject changed from As a user, I can list all Pulp users to As a user, I can CRUD Users via an API

#2 Updated by bmbouter 3 months ago

  • Description updated (diff)

#3 Updated by bmbouter 3 months ago

  • Description updated (diff)

#4 Updated by dkliban@redhat.com 3 months ago

  • Description updated (diff)

#5 Updated by bmbouter 3 months ago

  • Subject changed from As a user, I can CRUD Users via an API to As a user, I can Read Users, group membership, and their permissions via an API
  • Description updated (diff)

#6 Updated by dkliban@redhat.com 3 months ago

  • Groomed changed from No to Yes
  • Sprint set to Sprint 78

#7 Updated by bmbouter 3 months ago

  • Description updated (diff)

#8 Updated by fao89 3 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to fao89

#10 Updated by bmbouter 3 months ago

fao89 wrote:

should I move it to pulpcore? https://github.com/ansible/galaxy_ng/blob/master/galaxy_ng/app/models/auth.py

I don't think so, I believe we want to continue using the vanilla user model provided by Django.

#11 Updated by pulpbot 3 months ago

  • Status changed from ASSIGNED to POST

#12 Updated by rchan 3 months ago

  • Sprint changed from Sprint 78 to Sprint 79

#13 Updated by Anonymous 3 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#14 Updated by dkliban@redhat.com 2 months ago

  • Sprint/Milestone set to 3.6.0

#15 Updated by pulpbot 2 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF