Adding automatic permission code generation when changing list value