Feature request: User form to file a product creation / deletion request

Aperta
#5,100 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 8 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

The issue does not name implementation files or tests. Start by tracing the Products page’s addProduct and removeProduct flows, the configuration database schema, and the login/session handling; then identify the existing superuser page patterns. Done means logged-in users can submit valid requests, superusers can approve or reject them, and approval applies the requested product change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

good to go :rocket: GUI :art: new feature :+1:

Right now, only a SUPERUSER can add (addProduct) or delete
(removeProduct) a product on the Products page. Normal logged-in users
cannot do this. They have to reach out to a server administrator.

This feature adds a simple request flow:

  • Any logged-in user can fill in a short form to ask for a new product
    or to remove a product they already have.
  • Each request is saved in a new requests table in the configuration
    database.

Table structure:

Column Type Notes
id Integer, PK, autoincrement Row id (kept to match the other tables).
user_name String, not null Who made the request. Set by the server from the login session, the user does not need to provide it.
contact_email String, not null The user types this in the form.
endpoint String, not null The product endpoint (the new name to add, or the name of the product to remove). The server should check that the endpoint is valid. For a removal request, the endpoint must belong to a product that already exists. For a new product request, the endpoint must follow the naming rules (for example, no spaces).
request_type Enum(NEW_PRODUCT, PRODUCT_REMOVAL) What the user wants.
status Enum(NEW, APPROVED, REJECTED) Starts as NEW.
approver String, nullable The SUPERUSER who approved or rejected it. Set when the status changes from NEW.
request_date DateTime, not null Set to datetime.now() when the request is made.
  • SUPERUSERs get their own page that shows all requests, with simple
    Approve and Reject buttons.
  • When a request is approved, the action runs right away (it adds or removes
    the product).
  • In the form, users do not type their user name. The server gets it from the
    login session.
  • When requesting a new product, the requester will be the product's admin. This information should also be added to the form in the GUI.
  • Only an admin of a product can delete the product. If a non-product-admin user tries to file a request to remove a product, the
    server should immediately reject the request and not add it to the requests table at all.
Lingua principale
Python
Stelle
2.6k
Fork
494
Merge medio
6g 13h
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Ericsson/codechecker

Tutte le issue di Ericsson/codechecker

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.