Thread:Project:Support desk/Creating and checking a userright

Hello, i'm trying to write an extension.

What's the best way to create a new userright and checking whether a particular right is set for the user?

thank you