Code

Opened 5 years ago

Closed 14 months ago

#11136 closed Cleanup/optimization (duplicate)

add button to related field in admin to be put only if user is authorized to add

Reported by: sergio Owned by: anonymous
Component: contrib.admin Version: 1.0
Severity: Normal Keywords: add button
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

Here is the example situation:

- my model is composed of two classes A and B
- class A has a field being a foreign key to a B class field
- I have permission to add A elements, but not to add B elements
- in the admin, when I add an A element, I see the '+' button on the
foreign key field to B even though I do not have the rights to create
a B element
- therefore, I think I can add the element, but when I click on +, I get a pop-up with permission denied

it would be nicer not to show at all the "+"; better user experience

have a look at the second part of this thread:
http://groups.google.com/group/django-users/browse_thread/thread/ceef2d6fd5f5a528

Attachments (0)

Change History (8)

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by julien

  • Severity set to Normal
  • Type set to Cleanup/optimization

comment:3 Changed 3 years ago by julien

  • UI/UX set

comment:4 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:6 Changed 2 years ago by aaugustin

  • UI/UX set

Revert accidental batch modification.

comment:7 Changed 14 months ago by dwightgunning

  • Owner changed from nobody to anonymous
  • Status changed from new to assigned

comment:8 Changed 14 months ago by dwightgunning

  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #1035.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.