Modify ↓
Opened 7 years ago
Closed 7 years ago
#12837 closed defect (fixed)
Poor PermissionError message when resource.id is None
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.2.2 |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fixed poor error message when resource id is empty or |
||
API Changes: | |||
Internal Changes: |
Description
Examples:
/timeline
: TIMELINE_VIEW privileges are required to perform this operation on timeline:None. You don't have the required permissions./newticket
: TICKET_CREATE privileges are required to perform this operation on Ticket #None. You don't have the required permissions.
Proposed fix:
-
trac/perm.py
diff --git a/trac/perm.py b/trac/perm.py index b309a00f0..6f9405682 100644
a b class PermissionError(StandardError, TracBaseError): 51 51 self.resource = resource 52 52 self.env = env 53 53 if self.action: 54 if self.resource :54 if self.resource and self.resource.id: 55 55 msg = _("%(perm)s privileges are required to perform " 56 56 "this operation on %(resource)s. You don't have the " 57 57 "required permissions.",
Attachments (0)
Change History (1)
comment:1 by , 7 years ago
Milestone: | 1.2.3 → 1.2.2 |
---|---|
Release Notes: | modified (diff) |
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Committed to 1.2-stable in r16022, merged to trunk in r16023.