Improve error message from TracAdmin remove when permission doesn't exist — at Initial Version
|Reported by:||Ryan J Ollos||Owned by:|
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.