def check_config_permission(permission):
 key = permission.replace('ckan.auth.', '')
 if (key not in CONFIG_PERMISSIONS_DEFAULTS):
  return False
 default_value = CONFIG_PERMISSIONS_DEFAULTS.get(key)
 config_key = ('ckan.auth.' + key)
 value = config.get(config_key, default_value)
 if (key == 'roles_that_cascade_to_sub_groups'):
  value = (value.split() if value else [])
 else:
  value = asbool(value)
 return value

def check_config_permission ( permission ) : key = permission . replace ( 'ckan.auth.' , '' ) if ( key not in CONFIG_PERMISSIONS_DEFAULTS ) : return False default_value = CONFIG_PERMISSIONS_DEFAULTS . get ( key ) config_key = ( 'ckan.auth.' + key ) value = config . get ( config_key , default_value ) if ( key == 'roles_that_cascade_to_sub_groups' ) : value = ( value . split ( ) if value else [ ] ) else : value = asbool ( value ) return value
returns the configuration value for the provided permission permission is a string indentifying the auth permission .