How to check whether a user has permissions to a category
I know how to check permission with the checkPermission() function for a permission set by a plugin through "RegisterPermissions" (e.g. Plugins.Preview.View and checkPermission('Plugins.Preview.View')).
What it is not obvious to me how I check whether the user has permission to add or View discussions in a specific category (or for that matter other category-related permissions like add/view comments).
Can it be done via checkPermission and what parameters do I pass to it?
If not, how else can I check for these permissions?