Add permission handling code.

Signed-off-by: Tyler O'Meara <Tyler@TylerOMeara.com>