Edgewall Software

Opened 8 years ago

Last modified 7 years ago

#11938 closed enhancement

Improve error message from TracAdmin remove when permission doesn't exist — at Initial Version

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: 1.2
Component: admin/console Version:
Severity: normal Keywords: permission
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When attempting to assign an undefined permission a helpful error is echoed.

$ trac-admin ../tracdev permission add anonymous NOT_A_PERM
TracError: NOT_A_PERM is not a valid action.

The error message seen when attempting to remove an undefined permission is:

$ trac-admin ../tracdev permission remove anonymous NOT_A_PERM
Error: Cannot remove permission NOT_A_PERM for user anonymous. The user has not been granted the permission.

It would probably be more helpful to check if the permission exists before trying to remove it from a user, in order to echo a more helpful error message in the case that the user makes a typo or a Component isn't loaded.

Change History (1)

by walty <walty8@…>, 7 years ago

Note: See TracTickets for help on using tickets.