from trac.perm import PermissionSystem perms = PermissionSystem(env) if perms.check_permission('TICKET_MODIFY', 'user1'): # Do something if user1 has TICKET_MODIFY permission
from trac.perm import PermissionSystem perms = PermissionSystem(env) perms.revoke_permission('TICKET_CREATE', 'user2')
from trac.perm import PermissionSystem perms = PermissionSystem(env) perms.grant_permission('TEST_GROUP', 'user3')The library for the trac.perm PermissionSystem class is Trac itself, and it is included as a core component of the Trac open-source project.