Improve error message from TracAdmin remove when permission doesn't exist
|Reported by:||Ryan J Ollos||Owned by:|
Improved error message when adding and removing an invalid action with TracAdmin.
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 (12)
comment:8 by , 6 years ago
|Release Notes:||modified (diff)|
|Status:||assigned → closed|