Rename the username variable to user_name in the geonode_authorize_layer function.