# Directory and files where is stored Copr database files
DATA_DIR = '/var/lib/copr/data'
DATABASE = '/var/lib/copr/data/copr.db'
OPENID_STORE = '/var/lib/copr/data/openid_store'
WHOOSHEE_DIR = '/var/lib/copr/data/whooshee'

# salt for CSRF codes
#SECRET_KEY = 'put_some_secret_here'

#BACKEND_PASSWORD = 'password_here'

# restrict access to a set of users
#USE_ALLOWED_USERS = False
#ALLOWED_USERS = ['bonnie', 'clyde']

SQLALCHEMY_DATABASE_URI = 'sqlite:////var/lib/copr/data/copr.db'

# Token length, defaults to 30 (max 255)
#API_TOKEN_LENGTH = 30

# Expiration of API token in days
#API_TOKEN_EXPIRATION = 180

# logging options
#SEND_LOGS_TO = ['root@localhost']
#LOGGING_LEVEL = 'info'

DEBUG = True
SQLALCHEMY_ECHO = False

#CSRF_ENABLED = True
# as of Flask-WTF 0.9+
#WTF_CSRF_ENABLED = True

# send emails when user's perms change in project?
SEND_EMAILS = True

## post-process url leading to backend
## possible options: None, "http", "https"
ENFORCE_PROTOCOL_FOR_BACKEND_URL = "http"
## post-process url leading to frontend
ENFORCE_PROTOCOL_FOR_FRONTEND_URL = "http"

PUBLIC_COPR_HOSTNAME = "copr.stg.fedoraproject.org"

BACKEND_BASE_URL = "http://copr-be-dev.cloud.fedoraproject.org"
DIST_GIT_URL = "http://copr-dist-git-dev.fedorainfracloud.org/cgit/"
COPR_DIST_GIT_LOGS_URL = "http://copr-dist-git-dev.fedorainfracloud.org/per-task-logs"

LOG_FILENAME="/tmp/copr_frontend.log"
LOG_DIR = "/tmp/"

# IP or subnet
INTRANET_IPS = ["127.0.0.1", "192.168.1.0/24"]

REPO_GPGCHECK = 0

# a place for storing srpms until they get uploaded
STORAGE_DIR = "/var/lib/copr/data/srpm_storage"

# no need to filter cla_* groups, they are already filtered by fedora openid
GROUP_DENYLIST = ['fedorabugs', 'packager', 'provenpackager']

# Hide page parts not relevant to this Copr instance:
# LAYOUT_OVERVIEW_HIDE_QUICK_ENABLE = False

# enable Discourse integration
ENABLE_DISCUSSION = False
# DISCOURSE_URL = "https://discussion.fedoraproject.org/"


# Enable Profiler
# requires manual run of
# pip3 install flask_profiler
PROFILER = False

# These entries are common OIDC configs
# The OIDC_LOGIN and OIDC_PROVIDER_NAME should be present when OpenID Connect is enabled
# OIDC_LOGIN = False
# OIDC_PROVIDER_NAME = "" # e.g "openEuler ID"
# OIDC_CLIENT = ""
# OIDC_SECRET = ""
# OIDC_SCOPES = "" # e.g. "openid username profile email"
# OIDC_TOKEN_AUTH_METHOD="client_secret_post" # possible: client_secret_post, client_secret_basic, none

# We have supported two types of OIDC client register
# 1. dynamic register
# 2. static register
# For dynamic register: the OIDC_METADATA was used and only needed by dynamic provider register
# OIDC_METADATA = "" # such as "https://accounts.google.com/.well-known/openid-configuration"

# For static client register: you should config all items blow:
# OIDC_AUTH_URL=""
# OIDC_TOKEN_URL=""
# OIDC_USERINFO_URL=""

