added setPermissions