add permission code