fixed errors caused by made permission factory (no tests yet)
added permission interface